<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0058)https://docs.mongodb.com/manual/reference/operator/update/ -->
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <link href="./Update Operators_files/css" rel="stylesheet" type="text/css"><title>Update Operators — MongoDB Manual</title><link rel="shortcut icon" href="https://media.mongodb.org/favicon.ico">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
    <meta name="robots" content="index">

  <meta name="release" content="4.0.9">
  <meta name="version" content="4.0">
  <meta name="DC.Source" content="https://github.com/mongodb/docs/blob/v4.0/source/reference/operator/query.txt">
  <meta property="og:image" content="http://s3.amazonaws.com/info-mongodb-com/_com_assets/cms/mongodb-for-giant-ideas-bbab5c3cf8.png">
  <meta property="og:image:secure_url" content="https://webassets.mongodb.com/_com_assets/cms/mongodb-for-giant-ideas-bbab5c3cf8.png">
      <link rel="canonical" href="https://docs.mongodb.com/manual/reference/operator/query">
  
   <link rel="stylesheet" href="./Update Operators_files/mongodb-docs.css" type="text/css">
   <link rel="stylesheet" href="./Update Operators_files/pygments.css" type="text/css">
   <link rel="stylesheet" href="./Update Operators_files/navbar.min.css" type="text/css">
    
    <script type="text/javascript" async="" src="./Update Operators_files/analytics.js"></script><script type="text/javascript" async="" src="./Update Operators_files/amplitude-4.5.2-min.gz.js"></script><script type="text/javascript" async="" src="./Update Operators_files/BizibleAcct.js"></script><script src="./Update Operators_files/pubads_impl_rendering_2019050901.js"></script><script src="./Update Operators_files/5640.js" async="" type="text/javascript"></script><script async="" src="./Update Operators_files/fbevents.js"></script><script type="text/javascript" async="" src="./Update Operators_files/insight.min.js"></script><script type="text/javascript" async="" src="./Update Operators_files/elqCfg.min.js"></script><script async="" src="./Update Operators_files/roundtrip.js"></script><script type="text/javascript" async="" src="./Update Operators_files/f.txt"></script><script type="text/javascript" async="" src="./Update Operators_files/f.txt"></script><script type="text/javascript" async="" src="./Update Operators_files/analytics.min.js"></script><script type="text/javascript" async="" src="./Update Operators_files/delighted.js"></script><script async="" src="./Update Operators_files/gtm.js"></script><script async="" type="text/javascript" src="./Update Operators_files/gpt.js"></script><script type="text/javascript" src="./Update Operators_files/jquery.min.js"></script>
    <script type="text/javascript" src="./Update Operators_files/underscore.js"></script>
    <script type="text/javascript" src="./Update Operators_files/bootstrap.js"></script>
    <script type="text/javascript" src="./Update Operators_files/jquery.cookie.js"></script>
    <script type="text/javascript" src="./Update Operators_files/controller.js"></script>
      <link rel="search" type="application/opensearchdescription+xml" href="https://docs.mongodb.com/osd.xml" title="MongoDB Help">
<link rel="author" title="About these documents" href="https://docs.mongodb.com/manual/about/">
<!-- <link rel="index" title="Index" href="../../../genindex/" /> -->
<link rel="search" title="Search" href="https://docs.mongodb.com/manual/search/">
<link rel="top" title="MongoDB Manual" href="https://docs.mongodb.com/manual/">
<link rel="up" title="Operators" href="https://docs.mongodb.com/manual/reference/operator/">
<link rel="next" title="Comparison Query Operators" href="https://docs.mongodb.com/manual/reference/operator/query-comparison/">
<link rel="prev" title="Operators" href="https://docs.mongodb.com/manual/reference/operator/"><script type="text/javascript">
   var gptadslots=[];
   var googletag = googletag || {};
   googletag.cmd = googletag.cmd || [];
   (function(){ var gads = document.createElement('script');
      gads.async = true; gads.type = 'text/javascript';
      var useSSL = 'https:' == document.location.protocol;
      gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js';
      var node = document.getElementsByTagName('script')[0];
      node.parentNode.insertBefore(gads, node);
   })();
</script>

<script type="text/javascript">
   googletag.cmd.push(function() {

      var pathname = location.href;
      
      if ( (pathname.indexOf("auth") >= 0) || (pathname.indexOf("security") >= 0) ) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/security', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if ( (pathname.indexOf("crud") >= 0) ||  (pathname.indexOf("query") >= 0) || (pathname.indexOf("insert") >= 0) || (pathname.indexOf("update") >= 0) || (pathname.indexOf("remove") >= 0) || (pathname.indexOf("delete") >= 0) || (pathname.indexOf("aggregation") >= 0) ) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/crud', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("shard") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/sharding', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("replica") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/replication', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("model") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/data-modeling', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("administration") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/support', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("install-mongodb-on-windows") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/install-mongodb-on-windows', [160, 600], 'mongodb-docs-1').addService(googletag.pubads());
      } else if (pathname.indexOf("tutorial/getting-started") >= 0) {
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org/docs_server_gettingstarted', [160, 600], 'mongodb-docs-1').addService(googletag.pubads());
      } else {
         //Adslot 1 declaration
         gptadslots[1]= googletag.defineSlot('/40039723/docs.mongodb.org', [[160,600],[243,202],[293,244]],'mongodb-docs-1').addService(googletag.pubads());
      }
      googletag.pubads().enableSingleRequest();
      googletag.pubads().enableAsyncRendering();
      googletag.enableServices();
   });
</script><link rel="preload" href="./Update Operators_files/f(1).txt" as="script"><script type="text/javascript" src="./Update Operators_files/f(1).txt"></script><script src="./Update Operators_files/pubads_impl_2019050901.js" async=""></script><link rel="prefetch" href="https://tpc.googlesyndication.com/safeframe/1-0-33/html/container.html"><script src="./Update Operators_files/f(2).txt"></script><script src="./Update Operators_files/f(3).txt"></script></head>
<body data-project="manual" data-project-title="MongoDB Manual" data-branch="v4.0" data-enable-marian="1">
  <!-- Google Tag Manager -->
  <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-JQHP"
                    height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push(
     {'gtm.start': new Date().getTime(),event:'gtm.js'}
   );var f=d.getElementsByTagName(s)[0],
   j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
   '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
   })(window,document,'script','dataLayer','GTM-JQHP');</script>
  <!-- End Google Tag Manager -->
<div id="navbar" data-navprops="{&quot;links&quot;: [{&quot;url&quot;: &quot;https://docs.mongodb.com/manual/&quot;,&quot;text&quot;: &quot;Server&quot;,&quot;active&quot;: true},{&quot;url&quot;: &quot;https://docs.mongodb.com/ecosystem/drivers/&quot;,&quot;text&quot;: &quot;Drivers&quot;},{&quot;url&quot;: &quot;https://docs.mongodb.com/cloud/&quot;,&quot;text&quot;: &quot;Cloud&quot;},{&quot;url&quot;: &quot;https://docs.mongodb.com/tools/&quot;,&quot;text&quot;: &quot;Tools&quot;},{&quot;url&quot;: &quot;https://docs.mongodb.com/guides/&quot;,&quot;text&quot;: &quot;Guides&quot;}]}"><nav class="navbar"><div class="navbar__left"><a href="https://www.mongodb.com/"><img src="./Update Operators_files/mongodb-logo.png" class="navbar-brand" alt="MongoDB Logo"></a><span class="navbar-seperator"></span><div class="navbar-dropdown"><span class="navbar-dropdown__label">Documentation</span><div class="navbar-dropdown__menu navbar-dropdown__menu--hidden"><ul class="menu"><li class="menu__item"><a href="https://docs.mongodb.com/">Docs Home</a></li><li class="menu__item"><div><span class="submenu__title submenu__title--open">Documentation</span><ul class="submenu submenu--shown"><li class="submenu__item"><a href="https://docs.mongodb.com/manual/">MongoDB Server</a></li><li class="submenu__item"><a href="https://docs.mongodb.com/stitch/">MongoDB Stitch</a></li><li class="submenu__item"><div><span class="submenu__title">Drivers</span><ul class="submenu submenu--hidden"><li class="submenu__item"><a href="http://mongoc.org/libmongoc/current/">C</a></li><li class="submenu__item"><a href="https://mongodb.github.io/mongo-cxx-driver/">C++11</a></li><li class="submenu__item"><a href="https://docs.mongodb.com/ecosystem/drivers/csharp/">C#</a></li><li class="submenu__item"><a href="http://mongodb.github.io/mongo-java-driver/">Java</a></li><li class="submenu__item"><a href="https://mongodb.github.io/node-mongodb-native/">Node.js</a></li><li class="submenu__item"><a href="https://docs.mongodb.com/ecosystem/drivers/perl/">Perl</a></li><li class="submenu__item"><a href="https://docs.mongodb.com/ecosystem/drivers/php/">PHP</a></li><li class="submenu__item"><a href="https://docs.mongodb.com/ecosystem/drivers/python/">Python</a></li><li class="submenu__item"><a href="https://docs.mongodb.com/ecosystem/drivers/ruby/">Ruby</a></li><li class="submenu__item"><a href="https://docs.mongodb.com/ecosystem/drivers/scala/">Scala</a></li></ul></div></li><li class="submenu__item submenu__item--nested"><div><span class="submenu__title submenu__title--open">Cloud</span><ul class="submenu submenu--shown"><li class="submenu__item"><a href="https://docs.atlas.mongodb.com/">MongoDB Atlas</a></li><li class="submenu__item"><a href="https://docs.cloudmanager.mongodb.com/">MongoDB Cloud Manager</a></li><li class="submenu__item"><a href="https://docs.opsmanager.mongodb.com/current/">MongoDB Ops Manager</a></li></ul></div></li><li class="submenu__item submenu__item--nested"><div><span class="submenu__title submenu__title--open">Tools</span><ul class="submenu submenu--shown"><li class="submenu__item"><a href="https://docs.mongodb.com/bi-connector/current/">MongoDB BI Connector</a></li><li class="submenu__item"><a href="https://docs.mongodb.com/charts/saas/">MongoDB Charts</a></li><li class="submenu__item"><a href="https://docs.mongodb.com/compass/current/">MongoDB Compass</a></li><li class="submenu__item"><a href="https://docs.mongodb.com/kubernetes-operator/stable/">MongoDB Enterprise Kubernetes Operator</a></li><li class="submenu__item"><a href="https://docs.mongodb.com/spark-connector/current/">MongoDB Spark Connector</a></li></ul></div></li><li class="submenu__item"><a href="https://docs.mongodb.com/guides/">Guides</a></li></ul></div></li><li class="menu__item menu__item--secondary"><a href="https://www.mongodb.com/">Company</a></li><li class="menu__item menu__item--secondary"><a href="https://university.mongodb.com/">Learn</a></li><li class="menu__item menu__item--secondary"><a href="https://www.mongodb.com/community">Community</a></li><li class="menu__item menu__item--secondary"><a href="https://www.mongodb.com/what-is-mongodb">What is MongoDB</a></li><li class="menu__item menu__item--secondary"><a href="https://www.mongodb.com/download-center?jmp=docs">Get MongoDB</a></li><li class="menu__item menu__item--secondary"><a href="https://www.mongodb.com/contact?jmp=docs">Contact Us</a></li></ul></div></div></div><div class="navbar__right"><div class="navbar-links"><a href="https://docs.mongodb.com/manual/" class="navbar-links__item navbar-links__item--active">Server</a><a href="https://docs.mongodb.com/ecosystem/drivers/" class="navbar-links__item">Drivers</a><a href="https://docs.mongodb.com/cloud/" class="navbar-links__item">Cloud</a><a href="https://docs.mongodb.com/tools/" class="navbar-links__item">Tools</a><a href="https://docs.mongodb.com/guides/" class="navbar-links__item">Guides</a></div><div class="navbar-download"><a href="https://www.mongodb.com/download-center?utm_source=manual&amp;utm_campaign=download-mongodb-navbar-cta&amp;utm_medium=docs" class="navbar-download__text">Get MongoDB</a></div><input type="search" class="navbar-search" placeholder="Search Documentation" aria-label="Search Documentation" style="width: 369px;"></div></nav></div>
      <script>
        window.googleSearchCx = "017213726194841070573:WMX6838984"
	window.googleSearchPlaceholder = "Search Documentation"
        window.googleSearchResultsUrl = "http://docs.mongodb.com/manual/search/"
      </script>
    <script src="./Update Operators_files/navbar.min.js"></script>
  

  <div class="content">

   <div id="left-column">
         <aside id="sidebar" class="sidebar">
             
  <div class="sphinxsidebar" id="sphinxsidebar">
    <div id="sphinxsidebarwrapper" class="sphinxsidebarwrapper"><a href="javascript:void(0)" class="closeNav" id="closeNav">Close ×</a>


<h3>
  <a class="index-link" href="https://docs.mongodb.com/manual/">MongoDB Manual</a>
  
    <div class="btn-group btn-group-xs pull-right">
      <button type="button" class="version-button dropdown-toggle" data-toggle="dropdown">
        4.0 (current)<span class="caret"></span>
      </button>
      <ul class="dropdown-menu" role="menu">
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="master">4.2 (upcoming)</a>
          </li>
        
          
          <li class="active">
          
            <a href="#" data-path="manual">4.0 (current)</a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.6">3.6</a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.4">3.4</a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.2">3.2</a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v3.0">3.0</a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v2.6">2.6</a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v2.4">2.4</a>
          </li>
        
          
          <li>
          
            <a class="version-selector" href="#" data-path="v2.2">2.2</a>
          </li>
        
      </ul>
    </div>

</h3>

<ul class="current" style="display: block;"><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/introduction/">Introduction</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/getting-started/"><span class="expand-icon"></span>Getting Started</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/atlas-free-tier-setup/"><span class="expand-icon"></span>Create an Atlas Free Tier Cluster</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/databases-and-collections/"><span class="expand-icon docs-expand-arrow"></span>Databases and Collections</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/views/"><span class="expand-icon"></span>Views</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/capped-collections/"><span class="expand-icon"></span>Capped Collections</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/document/"><span class="expand-icon"></span>Documents</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/bson-types/"><span class="expand-icon"></span>BSON Types</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/bson-type-comparison-order/"><span class="expand-icon"></span>Comparison/Sort Order</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/mongodb-extended-json/"><span class="expand-icon"></span>MongoDB Extended JSON</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/installation/">Installation</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/install-community/"><span class="expand-icon docs-expand-arrow"></span>Install MongoDB Community Edition</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/install-on-linux/"><span class="expand-icon docs-expand-arrow"></span>Install on Linux</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/"><span class="expand-icon"></span>Install on Red Hat</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/"><span class="expand-icon docs-expand-arrow"></span>Install on Ubuntu</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu-tarball/"><span class="expand-icon"></span>Install using .tgz Tarball</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/installation-ubuntu-community-troubleshooting/"><span class="expand-icon"></span>Troubleshoot Ubuntu Installation</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/"><span class="expand-icon"></span>Install on Debian</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-suse/"><span class="expand-icon"></span>Install on SUSE</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-amazon/"><span class="expand-icon"></span>Install on Amazon</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/"><span class="expand-icon docs-expand-arrow"></span>Install on macOS</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x-tarball/"><span class="expand-icon"></span>Install using .tgz Tarball</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/"><span class="expand-icon docs-expand-arrow"></span>Install on Windows</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows-unattended/"><span class="expand-icon"></span>Install using <code class="docutils literal"><span class="pre">msiexec.exe</span></code></a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/install-enterprise/"><span class="expand-icon docs-expand-arrow"></span>Install MongoDB Enterprise</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/install-enterprise-linux/"><span class="expand-icon docs-expand-arrow"></span>Install on Linux</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-red-hat/"><span class="expand-icon"></span>Install on Red Hat</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-ubuntu/"><span class="expand-icon"></span>Install on Ubuntu</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-debian/"><span class="expand-icon"></span>Install on Debian</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-suse/"><span class="expand-icon"></span>Install on SUSE</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-amazon/"><span class="expand-icon"></span>Install on Amazon</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-os-x/"><span class="expand-icon"></span>Install on macOS</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-windows/"><span class="expand-icon docs-expand-arrow"></span>Install on Windows</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-windows-unattended/"><span class="expand-icon"></span>Install using <code class="docutils literal"><span class="pre">msiexec.exe</span></code></a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-with-docker/"><span class="expand-icon"></span>Install with Docker</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/upgrade-community-to-enterprise/"><span class="expand-icon docs-expand-arrow"></span>Upgrade MongoDB Community to MongoDB Enterprise</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/upgrade-to-enterprise-standalone/"><span class="expand-icon"></span>Upgrade to MongoDB Enterprise (Standalone)</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/upgrade-to-enterprise-replica-set/"><span class="expand-icon"></span>Upgrade to MongoDB Enterprise (Replica Set)</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/upgrade-to-enterprise-sharded-cluster/"><span class="expand-icon"></span>Upgrade to MongoDB Enterprise (Sharded Cluster)</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/verify-mongodb-packages/"><span class="expand-icon"></span>Verify Integrity of MongoDB Packages</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/mongo/">The <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-mongo-shell/"><span class="expand-icon"></span>Configure the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/access-mongo-shell-help/"><span class="expand-icon"></span>Access the <code class="docutils literal"><span class="pre">mongo</span></code> Shell Help</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/write-scripts-for-the-mongo-shell/"><span class="expand-icon"></span>Write Scripts for the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/shell-types/"><span class="expand-icon"></span>Data Types in the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/mongo-shell/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongo</span></code> Shell Quick Reference</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/crud/">MongoDB CRUD Operations</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/insert-documents/"><span class="expand-icon docs-expand-arrow"></span>Insert Documents</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/insert-methods/"><span class="expand-icon"></span>Insert Methods</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/query-documents/"><span class="expand-icon docs-expand-arrow"></span>Query Documents</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/query-embedded-documents/"><span class="expand-icon"></span>Query on Embedded/Nested Documents</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/query-arrays/"><span class="expand-icon"></span>Query an Array</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/query-array-of-documents/"><span class="expand-icon"></span>Query an Array of Embedded Documents</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/project-fields-from-query-results/"><span class="expand-icon"></span>Project Fields to Return from Query</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/query-for-null-fields/"><span class="expand-icon"></span>Query for Null or Missing Fields</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/iterate-a-cursor/"><span class="expand-icon"></span>Iterate a Cursor in the <code class="docutils literal"><span class="pre">mongo</span></code> Shell</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/update-documents/"><span class="expand-icon docs-expand-arrow"></span>Update Documents</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/update-methods/"><span class="expand-icon"></span>Update Methods</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/remove-documents/"><span class="expand-icon docs-expand-arrow"></span>Delete Documents</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/delete-methods/"><span class="expand-icon"></span>Delete Methods</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/bulk-write-operations/"><span class="expand-icon"></span>Bulk Write Operations</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/retryable-writes/"><span class="expand-icon"></span>Retryable Writes</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/sql-comparison/"><span class="expand-icon"></span>SQL to MongoDB Mapping Chart</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/text-search/"><span class="expand-icon docs-expand-arrow"></span>Text Search</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/link-text-indexes/"><span class="expand-icon"></span>Text Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/text-search-operators/"><span class="expand-icon"></span>Text Search Operators</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/text-search-in-aggregation/"><span class="expand-icon"></span>Text Search in the Aggregation Pipeline</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/text-search-languages/"><span class="expand-icon"></span>Text Search Languages</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/geospatial-queries/"><span class="expand-icon docs-expand-arrow"></span>Geospatial Queries</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/geospatial-tutorial/"><span class="expand-icon"></span>Find Restaurants with Geospatial Queries</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/geojson/"><span class="expand-icon"></span>GeoJSON Objects</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/read-concern/"><span class="expand-icon docs-expand-arrow"></span>Read Isolation (Read Concern)</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/read-concern-local/"><span class="expand-icon"></span>Read Concern <code class="docutils literal"><span class="pre">"local"</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/read-concern-available/"><span class="expand-icon"></span>Read Concern <code class="docutils literal"><span class="pre">"available"</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/read-concern-majority/"><span class="expand-icon"></span>Read Concern <code class="docutils literal"><span class="pre">"majority"</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/read-concern-linearizable/"><span class="expand-icon"></span>Read Concern <code class="docutils literal"><span class="pre">"linearizable"</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/read-concern-snapshot/"><span class="expand-icon"></span>Read Concern <code class="docutils literal"><span class="pre">"snapshot"</span></code></a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/write-concern/"><span class="expand-icon"></span>Write Acknowledgement (Write Concern)</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/crud/"><span class="expand-icon docs-expand-arrow"></span>MongoDB CRUD Concepts</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/write-operations-atomicity/"><span class="expand-icon"></span>Atomicity and Transactions</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/read-isolation-consistency-recency/"><span class="expand-icon docs-expand-arrow"></span>Read Isolation, Consistency, and Recency</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/core/causal-consistency-read-write-concerns/"><span class="expand-icon"></span>Causal Consistency and Read and Write Concerns</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/distributed-queries/"><span class="expand-icon"></span>Distributed Queries</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/perform-findAndModify-linearizable-reads/"><span class="expand-icon"></span>Linearizable Reads via <code class="docutils literal"><span class="pre">findAndModify</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/query-plans/"><span class="expand-icon"></span>Query Plans</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/query-optimization/"><span class="expand-icon docs-expand-arrow"></span>Query Optimization</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/evaluate-operation-performance/"><span class="expand-icon"></span>Evaluate Performance of Current Operations</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/optimize-query-performance-with-indexes-and-projections/"><span class="expand-icon"></span>Optimize Query Performance</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/core/write-performance/"><span class="expand-icon"></span>Write Operation Performance</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/explain-results/"><span class="expand-icon"></span>Explain Results</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/analyze-query-plan/"><span class="expand-icon"></span>Analyze Query Performance</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/tailable-cursors/"><span class="expand-icon"></span>Tailable Cursors</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/aggregation/">Aggregation</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/aggregation-pipeline/"><span class="expand-icon docs-expand-arrow"></span>Aggregation Pipeline</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/aggregation-pipeline-optimization/"><span class="expand-icon"></span>Aggregation Pipeline Optimization</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/aggregation-pipeline-limits/"><span class="expand-icon"></span>Aggregation Pipeline Limits</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/aggregation-pipeline-sharded-collections/"><span class="expand-icon"></span>Aggregation Pipeline and Sharded Collections</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/aggregation-zip-code-data-set/"><span class="expand-icon"></span>Example with ZIP Code Data</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/aggregation-with-user-preference-data/"><span class="expand-icon"></span>Example with User Preference Data</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/map-reduce/"><span class="expand-icon docs-expand-arrow"></span>Map-Reduce</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/map-reduce-sharded-collections/"><span class="expand-icon"></span>Map-Reduce and Sharded Collections</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/map-reduce-concurrency/"><span class="expand-icon"></span>Map-Reduce Concurrency</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/map-reduce-examples/"><span class="expand-icon"></span>Map-Reduce Examples</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/perform-incremental-map-reduce/"><span class="expand-icon"></span>Perform Incremental Map-Reduce</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/troubleshoot-map-function/"><span class="expand-icon"></span>Troubleshoot the Map Function</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/troubleshoot-reduce-function/"><span class="expand-icon"></span>Troubleshoot the Reduce Function</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/aggregation/"><span class="expand-icon docs-expand-arrow"></span>Aggregation Reference</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/meta/aggregation-quick-reference/"><span class="expand-icon"></span>Aggregation Pipeline Quick Reference</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/interface/"><span class="expand-icon"></span>Aggregation Commands</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/aggregation-commands-comparison/"><span class="expand-icon"></span>Aggregation Commands Comparison</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/aggregation-variables/"><span class="expand-icon"></span>Variables in Aggregation Expressions</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/sql-aggregation-comparison/"><span class="expand-icon"></span>SQL to Aggregation Mapping Chart</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/data-modeling/">Data Models</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/data-modeling-introduction/"><span class="expand-icon"></span>Data Modeling Introduction</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/schema-validation/"><span class="expand-icon"></span>Schema Validation</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/data-models/"><span class="expand-icon docs-expand-arrow"></span>Data Modeling Concepts</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/data-model-design/"><span class="expand-icon"></span>Data Model Design</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/data-model-operations/"><span class="expand-icon"></span>Operational Factors and Data Models</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/applications/data-models/"><span class="expand-icon docs-expand-arrow"></span>Data Model Examples and Patterns</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/applications/data-models-relationships/"><span class="expand-icon docs-expand-arrow"></span>Model Relationships Between Documents</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/model-embedded-one-to-one-relationships-between-documents/"><span class="expand-icon"></span>Model One-to-One Relationships with Embedded Documents</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/model-embedded-one-to-many-relationships-between-documents/"><span class="expand-icon"></span>Model One-to-Many Relationships with Embedded Documents</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/model-referenced-one-to-many-relationships-between-documents/"><span class="expand-icon"></span>Model One-to-Many Relationships with Document References</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/applications/data-models-tree-structures/"><span class="expand-icon docs-expand-arrow"></span>Model Tree Structures</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/model-tree-structures-with-parent-references/"><span class="expand-icon"></span>Model Tree Structures with Parent References</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/model-tree-structures-with-child-references/"><span class="expand-icon"></span>Model Tree Structures with Child References</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/model-tree-structures-with-ancestors-array/"><span class="expand-icon"></span>Model Tree Structures with an Array of Ancestors</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/model-tree-structures-with-materialized-paths/"><span class="expand-icon"></span>Model Tree Structures with Materialized Paths</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/model-tree-structures-with-nested-sets/"><span class="expand-icon"></span>Model Tree Structures with Nested Sets</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/applications/data-models-applications/"><span class="expand-icon docs-expand-arrow"></span>Model Specific Application Contexts</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/model-data-for-atomic-operations/"><span class="expand-icon"></span>Model Data for Atomic Operations</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/model-data-for-keyword-search/"><span class="expand-icon"></span>Model Data to Support Keyword Search</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/model-monetary-data/"><span class="expand-icon"></span>Model Monetary Data</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/model-time-data/"><span class="expand-icon"></span>Model Time Data</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/data-models/"><span class="expand-icon docs-expand-arrow"></span>Data Model Reference</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/database-references/"><span class="expand-icon"></span>Database References</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/core/transactions/">Transactions</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/transactions-production-consideration/"><span class="expand-icon"></span>Production Considerations</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/transactions-operations/"><span class="expand-icon"></span>Transactions and Operations</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/indexes/">Indexes</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/index-single/"><span class="expand-icon"></span>Single Field Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/index-compound/"><span class="expand-icon"></span>Compound Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/index-multikey/"><span class="expand-icon docs-expand-arrow"></span>Multikey Indexes</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/multikey-index-bounds/"><span class="expand-icon"></span>Multikey Index Bounds</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/index-text/"><span class="expand-icon docs-expand-arrow"></span>Text Indexes</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/specify-language-for-text-index/"><span class="expand-icon"></span>Specify a Language for Text Index</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/avoid-text-index-name-limit/"><span class="expand-icon"></span>Specify Name for <code class="docutils literal"><span class="pre">text</span></code> Index</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/control-results-of-text-search/"><span class="expand-icon"></span>Control Search Results with Weights</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/limit-number-of-items-scanned-for-text-search/"><span class="expand-icon"></span>Limit the Number of Entries Scanned</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/2dsphere/"><span class="expand-icon docs-expand-arrow"></span><code class="docutils literal"><span class="pre">2dsphere</span></code> Indexes</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/query-a-2dsphere-index/"><span class="expand-icon"></span>Query a <code class="docutils literal"><span class="pre">2dsphere</span></code> Index</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/2d/"><span class="expand-icon docs-expand-arrow"></span><code class="docutils literal"><span class="pre">2d</span></code> Indexes</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/build-a-2d-index/"><span class="expand-icon"></span>Create a <code class="docutils literal"><span class="pre">2d</span></code> Index</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/query-a-2d-index/"><span class="expand-icon"></span>Query a <code class="docutils literal"><span class="pre">2d</span></code> Index</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/geospatial-indexes/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">2d</span></code> Index Internals</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/calculate-distances-using-spherical-geometry-with-2d-geospatial-indexes/"><span class="expand-icon"></span>Calculate Distance Using Spherical Geometry</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/geohaystack/"><span class="expand-icon docs-expand-arrow"></span><code class="docutils literal"><span class="pre">geoHaystack</span></code> Indexes</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/build-a-geohaystack-index/"><span class="expand-icon"></span>Create a Haystack Index</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/query-a-geohaystack-index/"><span class="expand-icon"></span>Query a Haystack Index</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/index-hashed/"><span class="expand-icon"></span>Hashed Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/index-properties/"><span class="expand-icon docs-expand-arrow"></span>Index Properties</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/index-ttl/"><span class="expand-icon docs-expand-arrow"></span>TTL Indexes</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/expire-data/"><span class="expand-icon"></span>Expire Data from Collections by Setting TTL</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/index-unique/"><span class="expand-icon"></span>Unique Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/index-partial/"><span class="expand-icon"></span>Partial Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/index-case-insensitive/"><span class="expand-icon"></span>Case Insensitive Indexes</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/index-sparse/"><span class="expand-icon"></span>Sparse Indexes</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/index-creation/"><span class="expand-icon docs-expand-arrow"></span>Index Build Operations on a Populated Collection</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/build-indexes-on-replica-sets/"><span class="expand-icon"></span>Build Indexes on Replica Sets</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/index-intersection/"><span class="expand-icon"></span>Index Intersection</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/manage-indexes/"><span class="expand-icon"></span>Manage Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/measure-index-use/"><span class="expand-icon"></span>Measure Index Use</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/applications/indexes/"><span class="expand-icon docs-expand-arrow"></span>Indexing Strategies</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/create-indexes-to-support-queries/"><span class="expand-icon"></span>Create Indexes to Support Your Queries</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/sort-results-with-indexes/"><span class="expand-icon"></span>Use Indexes to Sort Query Results</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/ensure-indexes-fit-ram/"><span class="expand-icon"></span>Ensure Indexes Fit in RAM</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/create-queries-that-ensure-selectivity/"><span class="expand-icon"></span>Create Queries that Ensure Selectivity</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/indexes/"><span class="expand-icon"></span>Indexing Reference</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/security/">Security</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/security-checklist/"><span class="expand-icon"></span>Security Checklist</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/enable-authentication/"><span class="expand-icon"></span>Enable Access Control</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/authentication/"><span class="expand-icon docs-expand-arrow"></span>Authentication</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/security-users/"><span class="expand-icon docs-expand-arrow"></span>Users</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/create-users/"><span class="expand-icon"></span>Add Users</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/authentication-mechanisms/"><span class="expand-icon docs-expand-arrow"></span>Authentication Mechanisms</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/core/security-scram/"><span class="expand-icon"></span>SCRAM</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/core/security-x.509/"><span class="expand-icon docs-expand-arrow"></span>x.509</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-x509-client-authentication/"><span class="expand-icon"></span>Use x.509 Certificates to Authenticate Clients</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/authentication-mechanisms-enterprise/"><span class="expand-icon docs-expand-arrow"></span>Enterprise Authentication Mechanisms</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/core/kerberos/"><span class="expand-icon docs-expand-arrow"></span>Kerberos Authentication</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/control-access-to-mongodb-with-kerberos-authentication/"><span class="expand-icon"></span>Configure MongoDB with Kerberos Authentication on Linux</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/control-access-to-mongodb-windows-with-kerberos-authentication/"><span class="expand-icon"></span>Configure MongoDB with Kerberos Authentication on Windows</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/troubleshoot-kerberos/"><span class="expand-icon"></span>Troubleshoot Kerberos Authentication</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/kerberos-auth-activedirectory-authz/"><span class="expand-icon"></span>Configure MongoDB with Kerberos Authentication and Active Directory Authorization</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/core/security-ldap/"><span class="expand-icon docs-expand-arrow"></span>LDAP Proxy Authentication</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-ldap-sasl-activedirectory/"><span class="expand-icon"></span>Authenticate Using SASL and LDAP with ActiveDirectory</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-ldap-sasl-openldap/"><span class="expand-icon"></span>Authenticate Using SASL and LDAP with OpenLDAP</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/authenticate-nativeldap-activedirectory/"><span class="expand-icon"></span>Authenticate and Authorize Users Using Active Directory via Native LDAP</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/core/security-ldap-external/"><span class="expand-icon"></span>LDAP Authorization</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/security-internal-authentication/"><span class="expand-icon docs-expand-arrow"></span>Internal Authentication</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/deploy-replica-set-with-keyfile-access-control/"><span class="expand-icon"></span>Deploy New Replica Set With Keyfile Access Control</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/enforce-keyfile-access-control-in-existing-replica-set/"><span class="expand-icon"></span>Enforce Keyfile Access Control in a Replica Set</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/enforce-keyfile-access-control-in-existing-replica-set-without-downtime/"><span class="expand-icon"></span>Enforce Keyfile Access Control in a Replica Set without Downtime</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/deploy-sharded-cluster-with-keyfile-access-control/"><span class="expand-icon"></span>Deploy Sharded Cluster with Keyfile Access Control</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster/"><span class="expand-icon"></span>Enforce Keyfile Access Control in Sharded Cluster</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/enforce-keyfile-access-control-in-existing-sharded-cluster-no-downtime/"><span class="expand-icon"></span>Enforce Authentication in an Existing Sharded Cluster Without Downtime</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-x509-member-authentication/"><span class="expand-icon"></span>Use x.509 Certificate for Membership Authentication</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/upgrade-keyfile-to-x509/"><span class="expand-icon"></span>Upgrade from Keyfile Authentication to x.509 Authentication</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/authorization/"><span class="expand-icon docs-expand-arrow"></span>Role-Based Access Control</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/built-in-roles/"><span class="expand-icon"></span>Built-In Roles</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/security-user-defined-roles/"><span class="expand-icon"></span>User-Defined Roles</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/manage-users-and-roles/"><span class="expand-icon"></span>Manage Users and Roles</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/change-own-password-and-custom-data/"><span class="expand-icon"></span>Change Your Password and Custom Data</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/collection-level-access-control/"><span class="expand-icon"></span>Collection-Level Access Control</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/security-transport-encryption/"><span class="expand-icon docs-expand-arrow"></span>TLS/SSL (Transport Encryption)</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-ssl/"><span class="expand-icon"></span>Configure <code class="docutils literal"><span class="pre">mongod</span></code> and <code class="docutils literal"><span class="pre">mongos</span></code> for TLS/SSL</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-ssl-clients/"><span class="expand-icon"></span>TLS/SSL Configuration for Clients</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/upgrade-cluster-to-ssl/"><span class="expand-icon"></span>Upgrade a Cluster to Use TLS/SSL</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-fips/"><span class="expand-icon"></span>Configure MongoDB for FIPS</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/security-encryption-at-rest/"><span class="expand-icon docs-expand-arrow"></span>Encryption at Rest</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-encryption/"><span class="expand-icon"></span>Configure Encryption</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/rotate-encryption-key/"><span class="expand-icon"></span>Rotate Encryption Keys</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/auditing/"><span class="expand-icon docs-expand-arrow"></span>Auditing</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-auditing/"><span class="expand-icon"></span>Configure Auditing</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-audit-filters/"><span class="expand-icon"></span>Configure Audit Filters</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/audit-message/"><span class="expand-icon"></span>System Event Audit Messages</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/security-hardening/"><span class="expand-icon docs-expand-arrow"></span>Network and Configuration Hardening</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/security-mongodb-configuration/"><span class="expand-icon"></span>IP Binding</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-linux-iptables-firewall/"><span class="expand-icon"></span>Configure Linux <code class="docutils literal"><span class="pre">iptables</span></code> Firewall for MongoDB</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-windows-netsh-firewall/"><span class="expand-icon"></span>Configure Windows <code class="docutils literal"><span class="pre">netsh</span></code> Firewall for MongoDB</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/implement-field-level-redaction/"><span class="expand-icon"></span>Implement Field Level Redaction</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/security/"><span class="expand-icon docs-expand-arrow"></span>Security Reference</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/system-roles-collection/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">system.roles</span></code> Collection</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/system-users-collection/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">system.users</span></code> Collection</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/resource-document/"><span class="expand-icon"></span>Resource Document</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/privilege-actions/"><span class="expand-icon"></span>Privilege Actions</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/create-a-vulnerability-report/"><span class="expand-icon"></span>Create a Vulnerability Report</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/appendix/security/"><span class="expand-icon docs-expand-arrow"></span>Appendix</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/appendix/security/appendixA-openssl-ca/"><span class="expand-icon"></span>Appendix A - OpenSSL CA Certificate for Testing</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/appendix/security/appendixB-openssl-server/"><span class="expand-icon"></span>Appendix B - OpenSSL Server Certificates for Testing</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/appendix/security/appendixC-openssl-client/"><span class="expand-icon"></span>Appendix C - OpenSSL Client Certificates for Testing</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/changeStreams/">Change Streams</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/change-streams-production-recommendations/"><span class="expand-icon"></span>Change Streams Production Recommendations</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/change-events/"><span class="expand-icon"></span>Change Events</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/replication/">Replication</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-members/"><span class="expand-icon docs-expand-arrow"></span>Replica Set Members</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-primary/"><span class="expand-icon"></span>Replica Set Primary</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-secondary/"><span class="expand-icon docs-expand-arrow"></span>Replica Set Secondary Members</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-priority-0-member/"><span class="expand-icon"></span>Priority 0 Replica Set Members</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-hidden-member/"><span class="expand-icon"></span>Hidden Replica Set Members</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-delayed-member/"><span class="expand-icon"></span>Delayed Replica Set Members</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-arbiter/"><span class="expand-icon"></span>Replica Set Arbiter</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-oplog/"><span class="expand-icon"></span>Replica Set Oplog</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-sync/"><span class="expand-icon"></span>Replica Set Data Synchronization</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-architectures/"><span class="expand-icon docs-expand-arrow"></span>Replica Set Deployment Architectures</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-architecture-three-members/"><span class="expand-icon"></span>Three Member Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-architecture-geographically-distributed/"><span class="expand-icon"></span>Replica Sets Distributed Across Two or More Data Centers</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-high-availability/"><span class="expand-icon docs-expand-arrow"></span>Replica Set High Availability</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-elections/"><span class="expand-icon"></span>Replica Set Elections</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-rollbacks/"><span class="expand-icon"></span>Rollbacks During Replica Set Failover</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/applications/replication/"><span class="expand-icon docs-expand-arrow"></span>Replica Set Read and Write Semantics</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/replica-set-write-concern/"><span class="expand-icon"></span>Write Concern for Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/read-preference/"><span class="expand-icon"></span>Read Preference</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/read-preference-mechanics/"><span class="expand-icon"></span>Server Selection Algorithm</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/replica-set-deployment/"><span class="expand-icon docs-expand-arrow"></span>Replica Set Deployment Tutorials</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/deploy-replica-set/"><span class="expand-icon"></span>Deploy a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/deploy-replica-set-for-testing/"><span class="expand-icon"></span>Deploy a Replica Set for Testing and Development</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/deploy-geographically-distributed-replica-set/"><span class="expand-icon"></span>Deploy a Geographically Redundant Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/add-replica-set-arbiter/"><span class="expand-icon"></span>Add an Arbiter to Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/convert-standalone-to-replica-set/"><span class="expand-icon"></span>Convert a Standalone to a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/expand-replica-set/"><span class="expand-icon"></span>Add Members to a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/remove-replica-set-member/"><span class="expand-icon"></span>Remove Members from Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/replace-replica-set-member/"><span class="expand-icon"></span>Replace a Replica Set Member</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/replica-set-member-configuration/"><span class="expand-icon docs-expand-arrow"></span>Member Configuration Tutorials</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/adjust-replica-set-member-priority/"><span class="expand-icon"></span>Adjust Priority for Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-secondary-only-replica-set-member/"><span class="expand-icon"></span>Prevent Secondary from Becoming Primary</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-a-hidden-replica-set-member/"><span class="expand-icon"></span>Configure a Hidden Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-a-delayed-replica-set-member/"><span class="expand-icon"></span>Configure a Delayed Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-a-non-voting-replica-set-member/"><span class="expand-icon"></span>Configure Non-Voting Replica Set Member</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/convert-secondary-into-arbiter/"><span class="expand-icon"></span>Convert a Secondary to an Arbiter</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/replica-set-maintenance/"><span class="expand-icon docs-expand-arrow"></span>Replica Set Maintenance Tutorials</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/change-oplog-size/"><span class="expand-icon"></span>Change the Size of the Oplog</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/perform-maintence-on-replica-set-members/"><span class="expand-icon"></span>Perform Maintenance on Replica Set Members</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/force-member-to-be-primary/"><span class="expand-icon"></span>Force a Member to Become Primary</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/resync-replica-set-member/"><span class="expand-icon"></span>Resync a Member of a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-replica-set-tag-sets/"><span class="expand-icon"></span>Configure Replica Set Tag Sets</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/reconfigure-replica-set-with-unavailable-members/"><span class="expand-icon"></span>Reconfigure a Replica Set with Unavailable Members</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/manage-chained-replication/"><span class="expand-icon"></span>Manage Chained Replication</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/change-hostnames-in-a-replica-set/"><span class="expand-icon"></span>Change Hostnames in a Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/configure-replica-set-secondary-sync-target/"><span class="expand-icon"></span>Configure a Secondary’s Sync Target</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/replication/"><span class="expand-icon docs-expand-arrow"></span>Replication Reference</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/replica-configuration/"><span class="expand-icon"></span>Replica Set Configuration</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/replica-set-protocol-versions/"><span class="expand-icon"></span>Replica Set Protocol Version</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/troubleshoot-replica-sets/"><span class="expand-icon"></span>Troubleshoot Replica Sets</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/local-database/"><span class="expand-icon"></span>The <code class="docutils literal"><span class="pre">local</span></code> Database</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/replica-states/"><span class="expand-icon"></span>Replica Set Member States</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/read-preference/"><span class="expand-icon"></span>Read Preference Reference</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/master-slave/"><span class="expand-icon"></span>Convert a Master-Slave Deployment to a Replica Set</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/sharding/">Sharding</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/sharded-cluster-components/"><span class="expand-icon docs-expand-arrow"></span>Sharded Cluster Components</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/sharded-cluster-shards/"><span class="expand-icon"></span>Shards</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/sharded-cluster-config-servers/"><span class="expand-icon"></span>Config Servers (metadata)</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/sharded-cluster-query-router/"><span class="expand-icon"></span>Router (mongos)</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/sharding-shard-key/"><span class="expand-icon"></span>Shard Keys</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/hashed-sharding/"><span class="expand-icon docs-expand-arrow"></span>Hashed Sharding</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/deploy-sharded-cluster-hashed-sharding/"><span class="expand-icon"></span>Deploy Sharded Cluster using Hashed Sharding</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/ranged-sharding/"><span class="expand-icon docs-expand-arrow"></span>Ranged Sharding</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/deploy-sharded-cluster-ranged-sharding/"><span class="expand-icon"></span>Deploy Sharded Cluster using Ranged Sharding</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/zone-sharding/"><span class="expand-icon docs-expand-arrow"></span>Zones</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/manage-shard-zone/"><span class="expand-icon"></span>Manage Shard Zones</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/sharding-segmenting-data-by-location/"><span class="expand-icon"></span>Segmenting Data by Location</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/sharding-tiered-hardware-for-varying-slas/"><span class="expand-icon"></span>Tiered Hardware for Varying SLA or SLO</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/sharding-segmenting-shards/"><span class="expand-icon"></span>Segmenting Data by Application or Customer</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/sharding-high-availability-writes/"><span class="expand-icon"></span>Distributed Local Writes for Insert Only Workloads</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/sharding-data-partitioning/"><span class="expand-icon docs-expand-arrow"></span>Data Partitioning with Chunks</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/create-chunks-in-sharded-cluster/"><span class="expand-icon"></span>Create Chunks in a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/split-chunks-in-sharded-cluster/"><span class="expand-icon"></span>Split Chunks in a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/merge-chunks-in-sharded-cluster/"><span class="expand-icon"></span>Merge Chunks in a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/modify-chunk-size-in-sharded-cluster/"><span class="expand-icon"></span>Modify Chunk Size in a Sharded Cluster</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/sharding-balancer-administration/"><span class="expand-icon docs-expand-arrow"></span>Balancer</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/manage-sharded-cluster-balancer/"><span class="expand-icon"></span>Manage Sharded Cluster Balancer</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/migrate-chunks-in-sharded-cluster/"><span class="expand-icon"></span>Migrate Chunks in a Sharded Cluster</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/sharded-cluster-administration/"><span class="expand-icon docs-expand-arrow"></span>Administration</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/sharded-cluster-config-servers/"><span class="expand-icon docs-expand-arrow"></span>Config Server Administration</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/replace-config-server/"><span class="expand-icon"></span>Replace a Config Server</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/view-sharded-cluster-configuration/"><span class="expand-icon"></span>View Cluster Configuration</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/migrate-sharded-cluster-to-new-hardware/"><span class="expand-icon"></span>Migrate a Sharded Cluster to Different Hardware</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/add-shards-to-shard-cluster/"><span class="expand-icon"></span>Add Shards to a Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/remove-shards-from-cluster/"><span class="expand-icon"></span>Remove Shards from an Existing Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/clear-jumbo-flag/"><span class="expand-icon"></span>Clear <code class="docutils literal"><span class="pre">jumbo</span></code> Flag</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/backup-sharded-cluster-metadata/"><span class="expand-icon"></span>Back Up Cluster Metadata</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/convert-sharded-cluster-to-replica-set/"><span class="expand-icon"></span>Convert Sharded Cluster to Replica Set</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/convert-replica-set-to-replicated-shard-cluster/"><span class="expand-icon"></span>Convert a Replica Set to a Sharded Cluster</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/convert-shard-standalone-to-shard-replica-set/"><span class="expand-icon"></span>Convert a Shard Standalone to a Shard Replica Set</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/sharding/"><span class="expand-icon docs-expand-arrow"></span>Sharding Reference</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/sharded-cluster-requirements/"><span class="expand-icon"></span>Operational Restrictions</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/troubleshoot-sharded-clusters/"><span class="expand-icon"></span>Troubleshoot Sharded Clusters</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/config-database/"><span class="expand-icon"></span>Config Database</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/">Administration</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/production-notes/"><span class="expand-icon"></span>Production Notes</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/production-checklist-operations/"><span class="expand-icon"></span>Operations Checklist</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/production-checklist-development/"><span class="expand-icon"></span>Development Checklist</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/analyzing-mongodb-performance/"><span class="expand-icon docs-expand-arrow"></span>Performance</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/manage-the-database-profiler/"><span class="expand-icon docs-expand-arrow"></span>Database Profiler</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/database-profiler/"><span class="expand-icon"></span>Database Profiler Output</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/transparent-huge-pages/"><span class="expand-icon"></span>Disable Transparent Huge Pages (THP)</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/ulimit/"><span class="expand-icon"></span>UNIX <code class="docutils literal"><span class="pre">ulimit</span></code> Settings</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/configuration-and-maintenance/"><span class="expand-icon docs-expand-arrow"></span>Configuration and Maintenance</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/configuration/"><span class="expand-icon"></span>Run-time Database Configuration</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/upgrade-revision/"><span class="expand-icon"></span>Upgrade to the Latest Revision of MongoDB</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes/"><span class="expand-icon"></span>Manage <code class="docutils literal"><span class="pre">mongod</span></code> Processes</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/terminate-running-operations/"><span class="expand-icon"></span>Terminate Running Operations</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/rotate-log-files/"><span class="expand-icon"></span>Rotate Log Files</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/data-center-awareness/"><span class="expand-icon docs-expand-arrow"></span>Data Center Awareness</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/workload-isolation/"><span class="expand-icon"></span>Workload Isolation in MongoDB Deployments</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/zone-sharding/"><span class="expand-icon docs-expand-arrow"></span>Zones</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/manage-shard-zone/"><span class="expand-icon"></span>Manage Shard Zones</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/sharding-segmenting-data-by-location/"><span class="expand-icon"></span>Segmenting Data by Location</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/sharding-tiered-hardware-for-varying-slas/"><span class="expand-icon"></span>Tiered Hardware for Varying SLA or SLO</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/sharding-segmenting-shards/"><span class="expand-icon"></span>Segmenting Data by Application or Customer</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/sharding-high-availability-writes/"><span class="expand-icon"></span>Distributed Local Writes for Insert Only Workloads</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/manage-shard-zone/"><span class="expand-icon"></span>Manage Shard Zones</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/backups/"><span class="expand-icon docs-expand-arrow"></span>MongoDB Backup Methods</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/backup-with-filesystem-snapshots/"><span class="expand-icon"></span>Back Up and Restore with Filesystem Snapshots</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/backup-and-restore-tools/"><span class="expand-icon"></span>Back Up and Restore with MongoDB Tools</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/restore-replica-set-from-backup/"><span class="expand-icon"></span>Restore a Replica Set from MongoDB Backups</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/backup-sharded-clusters/"><span class="expand-icon docs-expand-arrow"></span>Backup and Restore Sharded Clusters</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/backup-sharded-cluster-with-filesystem-snapshots/"><span class="expand-icon"></span>Back Up a Sharded Cluster with File System Snapshots</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/backup-sharded-cluster-with-database-dumps/"><span class="expand-icon"></span>Back Up a Sharded Cluster with Database Dumps</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/schedule-backup-window-for-sharded-clusters/"><span class="expand-icon"></span>Schedule Backup Window for Sharded Clusters</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/restore-sharded-cluster/"><span class="expand-icon"></span>Restore a Sharded Cluster</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/recover-data-following-unexpected-shutdown/"><span class="expand-icon"></span>Recover a Standalone after an Unexpected Shutdown</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/monitoring/"><span class="expand-icon docs-expand-arrow"></span>Monitoring for MongoDB</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/administration/free-monitoring/"><span class="expand-icon"></span>Free Monitoring</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/monitor-with-snmp/"><span class="expand-icon"></span>Monitor MongoDB With SNMP on Linux</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/monitor-with-snmp-on-windows/"><span class="expand-icon"></span>Monitor MongoDB Windows with SNMP</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/troubleshoot-snmp/"><span class="expand-icon"></span>Troubleshoot SNMP</a></li></ul></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/storage/">Storage</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/storage-engines/"><span class="expand-icon docs-expand-arrow"></span>Storage Engines</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/wiredtiger/"><span class="expand-icon docs-expand-arrow"></span>WiredTiger Storage Engine</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/change-standalone-wiredtiger/"><span class="expand-icon"></span>Change Standalone to WiredTiger</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/change-replica-set-wiredtiger/"><span class="expand-icon"></span>Change Replica Set to WiredTiger</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/change-sharded-cluster-wiredtiger/"><span class="expand-icon"></span>Change Sharded Cluster to WiredTiger</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/mmapv1/"><span class="expand-icon"></span>MMAPv1 Storage Engine</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/core/inmemory/"><span class="expand-icon"></span>In-Memory Storage Engine</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/journaling/"><span class="expand-icon docs-expand-arrow"></span>Journaling</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/tutorial/manage-journaling/"><span class="expand-icon"></span>Manage Journaling</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/core/gridfs/"><span class="expand-icon"></span>GridFS</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/faq/storage/"><span class="expand-icon"></span>FAQ: MongoDB Storage</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/faq/">Frequently Asked Questions</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/faq/fundamentals/"><span class="expand-icon"></span>FAQ: MongoDB Fundamentals</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/faq/indexes/"><span class="expand-icon"></span>FAQ: Indexes</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/faq/concurrency/"><span class="expand-icon"></span>FAQ: Concurrency</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/faq/sharding/"><span class="expand-icon"></span>FAQ: Sharding with MongoDB</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/faq/replica-sets/"><span class="expand-icon"></span>FAQ: Replication and Replica Sets</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/faq/storage/"><span class="expand-icon"></span>FAQ: MongoDB Storage</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/faq/diagnostics/"><span class="expand-icon"></span>FAQ: MongoDB Diagnostics</a></li></ul></li><li class="toctree-l1 current"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/">Reference</a><ul class="current" style="display: block;"><li class="toctree-l2 current"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/"><span class="expand-icon docs-expand-arrow"></span>Operators</a><ul class="current" style="display: block;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/"><span class="expand-icon docs-expand-arrow"></span>Query and Projection Operators</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query-comparison/"><span class="expand-icon docs-expand-arrow"></span>Comparison Query Operators</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/eq/"><span class="expand-icon"></span>$eq</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/gt/"><span class="expand-icon"></span>$gt</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/gte/"><span class="expand-icon"></span>$gte</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/in/"><span class="expand-icon"></span>$in</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/lt/"><span class="expand-icon"></span>$lt</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/lte/"><span class="expand-icon"></span>$lte</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/ne/"><span class="expand-icon"></span>$ne</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/nin/"><span class="expand-icon"></span>$nin</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query-logical/"><span class="expand-icon docs-expand-arrow"></span>Logical Query Operators</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/and/"><span class="expand-icon"></span>$and</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/not/"><span class="expand-icon"></span>$not</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/nor/"><span class="expand-icon"></span>$nor</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/or/"><span class="expand-icon"></span>$or</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query-element/"><span class="expand-icon docs-expand-arrow"></span>Element Query Operators</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/exists/"><span class="expand-icon"></span>$exists</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/type/"><span class="expand-icon"></span>$type</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query-evaluation/"><span class="expand-icon docs-expand-arrow"></span>Evaluation Query Operators</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/expr/"><span class="expand-icon"></span>$expr</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/jsonSchema/"><span class="expand-icon"></span>$jsonSchema</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/mod/"><span class="expand-icon"></span>$mod</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/regex/"><span class="expand-icon"></span>$regex</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/text/"><span class="expand-icon"></span>$text</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/where/"><span class="expand-icon"></span>$where</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query-geospatial/"><span class="expand-icon docs-expand-arrow"></span>Geospatial Query Operators</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/geoIntersects/"><span class="expand-icon"></span>$geoIntersects</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/geoWithin/"><span class="expand-icon"></span>$geoWithin</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/near/"><span class="expand-icon"></span>$near</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/nearSphere/"><span class="expand-icon"></span>$nearSphere</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/box/"><span class="expand-icon"></span>$box</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/center/"><span class="expand-icon"></span>$center</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/centerSphere/"><span class="expand-icon"></span>$centerSphere</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/geometry/"><span class="expand-icon"></span>$geometry</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/maxDistance/"><span class="expand-icon"></span>$maxDistance</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/minDistance/"><span class="expand-icon"></span>$minDistance</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/polygon/"><span class="expand-icon"></span>$polygon</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/uniqueDocs/"><span class="expand-icon"></span>$uniqueDocs</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query-array/"><span class="expand-icon docs-expand-arrow"></span>Array Query Operators</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/all/"><span class="expand-icon"></span>$all</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/elemMatch/"><span class="expand-icon"></span>$elemMatch (query)</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/size/"><span class="expand-icon"></span>$size</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query-bitwise/"><span class="expand-icon docs-expand-arrow"></span>Bitwise Query Operators</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/bitsAllClear/"><span class="expand-icon"></span>$bitsAllClear</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/bitsAllSet/"><span class="expand-icon"></span>$bitsAllSet</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/bitsAnyClear/"><span class="expand-icon"></span>$bitsAnyClear</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/bitsAnySet/"><span class="expand-icon"></span>$bitsAnySet</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query/comment/"><span class="expand-icon"></span>$comment</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/projection/"><span class="expand-icon docs-expand-arrow"></span>Projection Operators</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/projection/positional/"><span class="expand-icon"></span>$ (projection)</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/projection/elemMatch/"><span class="expand-icon"></span>$elemMatch (projection)</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/projection/meta/"><span class="expand-icon"></span>$meta</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/projection/slice/"><span class="expand-icon"></span>$slice (projection)</a></li></ul></li></ul></li><li class="toctree-l3 current selected-item"><a class="reference internal current" href="https://docs.mongodb.com/manual/reference/operator/update/"><span class="expand-icon docs-expand-arrow"></span>Update Operators</a><ul><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update-field/"><span class="expand-icon docs-expand-arrow"></span>Field Update Operators</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/currentDate/"><span class="expand-icon"></span>$currentDate</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/inc/"><span class="expand-icon"></span>$inc</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/min/"><span class="expand-icon"></span>$min</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/max/"><span class="expand-icon"></span>$max</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/mul/"><span class="expand-icon"></span>$mul</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/rename/"><span class="expand-icon"></span>$rename</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/set/"><span class="expand-icon"></span>$set</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/setOnInsert/"><span class="expand-icon"></span>$setOnInsert</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/unset/"><span class="expand-icon"></span>$unset</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update-array/"><span class="expand-icon docs-expand-arrow"></span>Array Update Operators</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/positional/"><span class="expand-icon"></span>$ (update)</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/positional-all/"><span class="expand-icon"></span>$[]</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/positional-filtered/"><span class="expand-icon"></span>$[&lt;identifier&gt;]</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/addToSet/"><span class="expand-icon"></span>$addToSet</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/pop/"><span class="expand-icon"></span>$pop</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/pull/"><span class="expand-icon"></span>$pull</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/push/"><span class="expand-icon"></span>$push</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/pullAll/"><span class="expand-icon"></span>$pullAll</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/each/"><span class="expand-icon"></span>$each</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/position/"><span class="expand-icon"></span>$position</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/slice/"><span class="expand-icon"></span>$slice</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/sort/"><span class="expand-icon"></span>$sort</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update-bitwise/"><span class="expand-icon docs-expand-arrow"></span>Bitwise Update Operator</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/bit/"><span class="expand-icon"></span>$bit</a></li></ul></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation-pipeline/"><span class="expand-icon docs-expand-arrow"></span>Aggregation Pipeline Stages</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/addFields/"><span class="expand-icon"></span>$addFields (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/bucket/"><span class="expand-icon"></span>$bucket (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/bucketAuto/"><span class="expand-icon"></span>$bucketAuto (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/collStats/"><span class="expand-icon"></span>$collStats (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/count/"><span class="expand-icon"></span>$count (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/currentOp/"><span class="expand-icon"></span>$currentOp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/facet/"><span class="expand-icon"></span>$facet (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/geoNear/"><span class="expand-icon"></span>$geoNear (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/graphLookup/"><span class="expand-icon"></span>$graphLookup (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/group/"><span class="expand-icon"></span>$group (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/indexStats/"><span class="expand-icon"></span>$indexStats (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/limit/"><span class="expand-icon"></span>$limit (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/listLocalSessions/"><span class="expand-icon"></span>$listLocalSessions</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/listSessions/"><span class="expand-icon"></span>$listSessions</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/"><span class="expand-icon"></span>$lookup (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/match/"><span class="expand-icon"></span>$match (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/out/"><span class="expand-icon"></span>$out (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/project/"><span class="expand-icon"></span>$project (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/redact/"><span class="expand-icon"></span>$redact (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/replaceRoot/"><span class="expand-icon"></span>$replaceRoot (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/sample/"><span class="expand-icon"></span>$sample (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/skip/"><span class="expand-icon"></span>$skip (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/sort/"><span class="expand-icon"></span>$sort (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/sortByCount/"><span class="expand-icon"></span>$sortByCount (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/unwind/"><span class="expand-icon"></span>$unwind (aggregation)</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/"><span class="expand-icon docs-expand-arrow"></span>Aggregation Pipeline Operators</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/abs/"><span class="expand-icon"></span>$abs (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/add/"><span class="expand-icon"></span>$add (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/addToSet/"><span class="expand-icon"></span>$addToSet (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/allElementsTrue/"><span class="expand-icon"></span>$allElementsTrue (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/and/"><span class="expand-icon"></span>$and (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/anyElementTrue/"><span class="expand-icon"></span>$anyElementTrue (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/arrayElemAt/"><span class="expand-icon"></span>$arrayElemAt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/arrayToObject/"><span class="expand-icon"></span>$arrayToObject (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/avg/"><span class="expand-icon"></span>$avg (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/ceil/"><span class="expand-icon"></span>$ceil (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/cmp/"><span class="expand-icon"></span>$cmp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/concat/"><span class="expand-icon"></span>$concat (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/concatArrays/"><span class="expand-icon"></span>$concatArrays (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/cond/"><span class="expand-icon"></span>$cond (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/convert/"><span class="expand-icon"></span>$convert (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/dateFromParts/"><span class="expand-icon"></span>$dateFromParts (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/dateToParts/"><span class="expand-icon"></span>$dateToParts (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/dateFromString/"><span class="expand-icon"></span>$dateFromString (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/dateToString/"><span class="expand-icon"></span>$dateToString (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/dayOfMonth/"><span class="expand-icon"></span>$dayOfMonth (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/dayOfWeek/"><span class="expand-icon"></span>$dayOfWeek (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/dayOfYear/"><span class="expand-icon"></span>$dayOfYear (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/divide/"><span class="expand-icon"></span>$divide (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/eq/"><span class="expand-icon"></span>$eq (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/exp/"><span class="expand-icon"></span>$exp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/filter/"><span class="expand-icon"></span>$filter (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/first/"><span class="expand-icon"></span>$first (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/floor/"><span class="expand-icon"></span>$floor (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/gt/"><span class="expand-icon"></span>$gt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/gte/"><span class="expand-icon"></span>$gte (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/hour/"><span class="expand-icon"></span>$hour (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/ifNull/"><span class="expand-icon"></span>$ifNull (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/in/"><span class="expand-icon"></span>$in (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/indexOfArray/"><span class="expand-icon"></span>$indexOfArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/indexOfBytes/"><span class="expand-icon"></span>$indexOfBytes (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/indexOfCP/"><span class="expand-icon"></span>$indexOfCP (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/isArray/"><span class="expand-icon"></span>$isArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/isoDayOfWeek/"><span class="expand-icon"></span>$isoDayOfWeek (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/isoWeek/"><span class="expand-icon"></span>$isoWeek (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/isoWeekYear/"><span class="expand-icon"></span>$isoWeekYear (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/last/"><span class="expand-icon"></span>$last (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/let/"><span class="expand-icon"></span>$let (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/literal/"><span class="expand-icon"></span>$literal (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/ln/"><span class="expand-icon"></span>$ln (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/log/"><span class="expand-icon"></span>$log (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/log10/"><span class="expand-icon"></span>$log10 (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/lt/"><span class="expand-icon"></span>$lt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/lte/"><span class="expand-icon"></span>$lte (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/ltrim/"><span class="expand-icon"></span>$ltrim (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/map/"><span class="expand-icon"></span>$map (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/max/"><span class="expand-icon"></span>$max (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/mergeObjects/"><span class="expand-icon"></span>$mergeObjects (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/meta/"><span class="expand-icon"></span>$meta (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/min/"><span class="expand-icon"></span>$min (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/millisecond/"><span class="expand-icon"></span>$millisecond (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/minute/"><span class="expand-icon"></span>$minute (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/mod/"><span class="expand-icon"></span>$mod (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/month/"><span class="expand-icon"></span>$month (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/multiply/"><span class="expand-icon"></span>$multiply (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/ne/"><span class="expand-icon"></span>$ne (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/not/"><span class="expand-icon"></span>$not (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/objectToArray/"><span class="expand-icon"></span>$objectToArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/or/"><span class="expand-icon"></span>$or (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/pow/"><span class="expand-icon"></span>$pow (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/push/"><span class="expand-icon"></span>$push (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/range/"><span class="expand-icon"></span>$range (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/reduce/"><span class="expand-icon"></span>$reduce (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/reverseArray/"><span class="expand-icon"></span>$reverseArray (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/rtrim/"><span class="expand-icon"></span>$rtrim (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/second/"><span class="expand-icon"></span>$second (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/setDifference/"><span class="expand-icon"></span>$setDifference (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/setEquals/"><span class="expand-icon"></span>$setEquals (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/setIntersection/"><span class="expand-icon"></span>$setIntersection (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/setIsSubset/"><span class="expand-icon"></span>$setIsSubset (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/setUnion/"><span class="expand-icon"></span>$setUnion (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/size/"><span class="expand-icon"></span>$size (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/slice/"><span class="expand-icon"></span>$slice (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/split/"><span class="expand-icon"></span>$split (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/sqrt/"><span class="expand-icon"></span>$sqrt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/stdDevPop/"><span class="expand-icon"></span>$stdDevPop (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/stdDevSamp/"><span class="expand-icon"></span>$stdDevSamp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/strcasecmp/"><span class="expand-icon"></span>$strcasecmp (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/strLenBytes/"><span class="expand-icon"></span>$strLenBytes (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/strLenCP/"><span class="expand-icon"></span>$strLenCP (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/substr/"><span class="expand-icon"></span>$substr (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/substrBytes/"><span class="expand-icon"></span>$substrBytes (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/substrCP/"><span class="expand-icon"></span>$substrCP (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/subtract/"><span class="expand-icon"></span>$subtract (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/sum/"><span class="expand-icon"></span>$sum (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/switch/"><span class="expand-icon"></span>$switch (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/toBool/"><span class="expand-icon"></span>$toBool (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/toDate/"><span class="expand-icon"></span>$toDate (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/toDecimal/"><span class="expand-icon"></span>$toDecimal (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/toDouble/"><span class="expand-icon"></span>$toDouble(aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/toInt/"><span class="expand-icon"></span>$toInt (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/toLong/"><span class="expand-icon"></span>$toLong (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/toObjectId/"><span class="expand-icon"></span>$toObjectId (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/toString/"><span class="expand-icon"></span>$toString (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/toLower/"><span class="expand-icon"></span>$toLower (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/toUpper/"><span class="expand-icon"></span>$toUpper (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/trim/"><span class="expand-icon"></span>$trim (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/trunc/"><span class="expand-icon"></span>$trunc (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/type/"><span class="expand-icon"></span>$type (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/week/"><span class="expand-icon"></span>$week (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/year/"><span class="expand-icon"></span>$year (aggregation)</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/aggregation/zip/"><span class="expand-icon"></span>$zip (aggregation)</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/query-modifier/"><span class="expand-icon docs-expand-arrow"></span>Query Modifiers</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/meta/comment/"><span class="expand-icon"></span>$comment</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/meta/explain/"><span class="expand-icon"></span>$explain</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/meta/hint/"><span class="expand-icon"></span>$hint</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/meta/maxScan/"><span class="expand-icon"></span>$maxScan</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/meta/max/"><span class="expand-icon"></span>$max</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/meta/maxTimeMS/"><span class="expand-icon"></span>$maxTimeMS</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/meta/min/"><span class="expand-icon"></span>$min</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/meta/orderby/"><span class="expand-icon"></span>$orderby</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/meta/query/"><span class="expand-icon"></span>$query</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/meta/returnKey/"><span class="expand-icon"></span>$returnKey</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/meta/showDiskLoc/"><span class="expand-icon"></span>$showDiskLoc</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/meta/natural/"><span class="expand-icon"></span>$natural</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/"><span class="expand-icon docs-expand-arrow"></span>Database Commands</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-aggregation/"><span class="expand-icon docs-expand-arrow"></span>Aggregation Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/aggregate/"><span class="expand-icon"></span>aggregate</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/count/"><span class="expand-icon"></span>count</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/distinct/"><span class="expand-icon"></span>distinct</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/group/"><span class="expand-icon"></span>group</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/mapReduce/"><span class="expand-icon"></span>mapReduce</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-geospatial/"><span class="expand-icon docs-expand-arrow"></span>Geospatial Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/geoNear/"><span class="expand-icon"></span>geoNear</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/geoSearch/"><span class="expand-icon"></span>geoSearch</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-crud/"><span class="expand-icon docs-expand-arrow"></span>Query and Write Operation Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/delete/"><span class="expand-icon"></span>delete</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/eval/"><span class="expand-icon"></span>eval</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/find/"><span class="expand-icon"></span>find</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/findAndModify/"><span class="expand-icon"></span>findAndModify</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/getLastError/"><span class="expand-icon"></span>getLastError</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/getMore/"><span class="expand-icon"></span>getMore</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/getPrevError/"><span class="expand-icon"></span>getPrevError</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/insert/"><span class="expand-icon"></span>insert</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/parallelCollectionScan/"><span class="expand-icon"></span>parallelCollectionScan</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/resetError/"><span class="expand-icon"></span>resetError</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/update/"><span class="expand-icon"></span>update</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-plan-cache/"><span class="expand-icon docs-expand-arrow"></span>Query Plan Cache Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/planCacheClear/"><span class="expand-icon"></span>planCacheClear</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/planCacheClearFilters/"><span class="expand-icon"></span>planCacheClearFilters</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/planCacheListFilters/"><span class="expand-icon"></span>planCacheListFilters</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/planCacheListPlans/"><span class="expand-icon"></span>planCacheListPlans</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/planCacheListQueryShapes/"><span class="expand-icon"></span>planCacheListQueryShapes</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/planCacheSetFilter/"><span class="expand-icon"></span>planCacheSetFilter</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-authentication/"><span class="expand-icon docs-expand-arrow"></span>Authentication Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/authenticate/"><span class="expand-icon"></span>authenticate</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/getnonce/"><span class="expand-icon"></span>getnonce</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/logout/"><span class="expand-icon"></span>logout</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-user-management/"><span class="expand-icon docs-expand-arrow"></span>User Management Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/createUser/"><span class="expand-icon"></span>createUser</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/dropAllUsersFromDatabase/"><span class="expand-icon"></span>dropAllUsersFromDatabase</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/dropUser/"><span class="expand-icon"></span>dropUser</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/grantRolesToUser/"><span class="expand-icon"></span>grantRolesToUser</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/revokeRolesFromUser/"><span class="expand-icon"></span>revokeRolesFromUser</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/updateUser/"><span class="expand-icon"></span>updateUser</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/usersInfo/"><span class="expand-icon"></span>usersInfo</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-role-management/"><span class="expand-icon docs-expand-arrow"></span>Role Management Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/createRole/"><span class="expand-icon"></span>createRole</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/dropRole/"><span class="expand-icon"></span>dropRole</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/dropAllRolesFromDatabase/"><span class="expand-icon"></span>dropAllRolesFromDatabase</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/grantPrivilegesToRole/"><span class="expand-icon"></span>grantPrivilegesToRole</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/grantRolesToRole/"><span class="expand-icon"></span>grantRolesToRole</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/invalidateUserCache/"><span class="expand-icon"></span>invalidateUserCache</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/revokePrivilegesFromRole/"><span class="expand-icon"></span>revokePrivilegesFromRole</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/revokeRolesFromRole/"><span class="expand-icon"></span>revokeRolesFromRole</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/rolesInfo/"><span class="expand-icon"></span>rolesInfo</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/updateRole/"><span class="expand-icon"></span>updateRole</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-replication/"><span class="expand-icon docs-expand-arrow"></span>Replication Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/applyOps/"><span class="expand-icon"></span>applyOps</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/isMaster/"><span class="expand-icon"></span>isMaster</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/replSetAbortPrimaryCatchUp/"><span class="expand-icon"></span>replSetAbortPrimaryCatchUp</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/replSetFreeze/"><span class="expand-icon"></span>replSetFreeze</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/replSetGetConfig/"><span class="expand-icon"></span>replSetGetConfig</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/replSetGetStatus/"><span class="expand-icon"></span>replSetGetStatus</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/replSetInitiate/"><span class="expand-icon"></span>replSetInitiate</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/replSetMaintenance/"><span class="expand-icon"></span>replSetMaintenance</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/replSetReconfig/"><span class="expand-icon"></span>replSetReconfig</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/replSetResizeOplog/"><span class="expand-icon"></span>replSetResizeOplog</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/replSetStepDown/"><span class="expand-icon"></span>replSetStepDown</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/replSetSyncFrom/"><span class="expand-icon"></span>replSetSyncFrom</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-sharding/"><span class="expand-icon docs-expand-arrow"></span>Sharding Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/addShard/"><span class="expand-icon"></span>addShard</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/addShardToZone/"><span class="expand-icon"></span>addShardToZone</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/balancerStart/"><span class="expand-icon"></span>balancerStart</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/balancerStatus/"><span class="expand-icon"></span>balancerStatus</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/balancerStop/"><span class="expand-icon"></span>balancerStop</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/checkShardingIndex/"><span class="expand-icon"></span>checkShardingIndex</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/cleanupOrphaned/"><span class="expand-icon"></span>cleanupOrphaned</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/enableSharding/"><span class="expand-icon"></span>enableSharding</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/flushRouterConfig/"><span class="expand-icon"></span>flushRouterConfig</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/getShardMap/"><span class="expand-icon"></span>getShardMap</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/getShardVersion/"><span class="expand-icon"></span>getShardVersion</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/isdbgrid/"><span class="expand-icon"></span>isdbgrid</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/listShards/"><span class="expand-icon"></span>listShards</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/medianKey/"><span class="expand-icon"></span>medianKey</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/moveChunk/"><span class="expand-icon"></span>moveChunk</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/movePrimary/"><span class="expand-icon"></span>movePrimary</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/mergeChunks/"><span class="expand-icon"></span>mergeChunks</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/removeShard/"><span class="expand-icon"></span>removeShard</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/removeShardFromZone/"><span class="expand-icon"></span>removeShardFromZone</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/setShardVersion/"><span class="expand-icon"></span>setShardVersion</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/shardCollection/"><span class="expand-icon"></span>shardCollection</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/shardingState/"><span class="expand-icon"></span>shardingState</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/split/"><span class="expand-icon"></span>split</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/splitChunk/"><span class="expand-icon"></span>splitChunk</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/splitVector/"><span class="expand-icon"></span>splitVector</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/unsetSharding/"><span class="expand-icon"></span>unsetSharding</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/updateZoneKeyRange/"><span class="expand-icon"></span>updateZoneKeyRange</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-sessions/"><span class="expand-icon docs-expand-arrow"></span>Sessions Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/abortTransaction/"><span class="expand-icon"></span>abortTransaction</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/commitTransaction/"><span class="expand-icon"></span>commitTransaction</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/endSessions/"><span class="expand-icon"></span>endSessions</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/killAllSessions/"><span class="expand-icon"></span>killAllSessions</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/killAllSessionsByPattern/"><span class="expand-icon"></span>killAllSessionsByPattern</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/killSessions/"><span class="expand-icon"></span>killSessions</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/refreshSessions/"><span class="expand-icon"></span>refreshSessions</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/startSession/"><span class="expand-icon"></span>startSession</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-administration/"><span class="expand-icon docs-expand-arrow"></span>Administration Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/clean/"><span class="expand-icon"></span>clean</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/clone/"><span class="expand-icon"></span>clone</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/cloneCollection/"><span class="expand-icon"></span>cloneCollection</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/cloneCollectionAsCapped/"><span class="expand-icon"></span>cloneCollectionAsCapped</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/collMod/"><span class="expand-icon"></span>collMod</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/compact/"><span class="expand-icon"></span>compact</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/connPoolSync/"><span class="expand-icon"></span>connPoolSync</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/convertToCapped/"><span class="expand-icon"></span>convertToCapped</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/copydb/"><span class="expand-icon"></span>copydb</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/create/"><span class="expand-icon"></span>create</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/createIndexes/"><span class="expand-icon"></span>createIndexes</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/currentOp/"><span class="expand-icon"></span>currentOp</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/drop/"><span class="expand-icon"></span>drop</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/dropDatabase/"><span class="expand-icon"></span>dropDatabase</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/dropIndexes/"><span class="expand-icon"></span>dropIndexes</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/filemd5/"><span class="expand-icon"></span>filemd5</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/fsync/"><span class="expand-icon"></span>fsync</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/fsyncUnlock/"><span class="expand-icon"></span>fsyncUnlock</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/getParameter/"><span class="expand-icon"></span>getParameter</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/killCursors/"><span class="expand-icon"></span>killCursors</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/killOp/"><span class="expand-icon"></span>killOp</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/listCollections/"><span class="expand-icon"></span>listCollections</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/listDatabases/"><span class="expand-icon"></span>listDatabases</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/listIndexes/"><span class="expand-icon"></span>listIndexes</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/logRotate/"><span class="expand-icon"></span>logRotate</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/reIndex/"><span class="expand-icon"></span>reIndex</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/renameCollection/"><span class="expand-icon"></span>renameCollection</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/repairDatabase/"><span class="expand-icon"></span>repairDatabase</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/setFeatureCompatibilityVersion/"><span class="expand-icon"></span>setFeatureCompatibilityVersion</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/setParameter/"><span class="expand-icon"></span>setParameter</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/shutdown/"><span class="expand-icon"></span>shutdown</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/touch/"><span class="expand-icon"></span>touch</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-diagnostic/"><span class="expand-icon docs-expand-arrow"></span>Diagnostic Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/availableQueryOptions/"><span class="expand-icon"></span>availableQueryOptions</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/buildInfo/"><span class="expand-icon"></span>buildInfo</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/collStats/"><span class="expand-icon"></span>collStats</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/connPoolStats/"><span class="expand-icon"></span>connPoolStats</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/connectionStatus/"><span class="expand-icon"></span>connectionStatus</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/cursorInfo/"><span class="expand-icon"></span>cursorInfo</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/dataSize/"><span class="expand-icon"></span>dataSize</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/dbHash/"><span class="expand-icon"></span>dbHash</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/dbStats/"><span class="expand-icon"></span>dbStats</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/diagLogging/"><span class="expand-icon"></span>diagLogging</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/driverOIDTest/"><span class="expand-icon"></span>driverOIDTest</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/explain/"><span class="expand-icon"></span>explain</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/features/"><span class="expand-icon"></span>features</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/getCmdLineOpts/"><span class="expand-icon"></span>getCmdLineOpts</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/getLog/"><span class="expand-icon"></span>getLog</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/hostInfo/"><span class="expand-icon"></span>hostInfo</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/isSelf/"><span class="expand-icon"></span>isSelf</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/listCommands/"><span class="expand-icon"></span>listCommands</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/netstat/"><span class="expand-icon"></span>netstat</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/ping/"><span class="expand-icon"></span>ping</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/profile/"><span class="expand-icon"></span>profile</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/serverStatus/"><span class="expand-icon"></span>serverStatus</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/shardConnPoolStats/"><span class="expand-icon"></span>shardConnPoolStats</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/top/"><span class="expand-icon"></span>top</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/validate/"><span class="expand-icon"></span>validate</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/whatsmyuri/"><span class="expand-icon"></span>whatsmyuri</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-free-monitoring/"><span class="expand-icon docs-expand-arrow"></span>Free Monitoring Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/getFreeMonitoringStatus/"><span class="expand-icon"></span>getFreeMonitoringStatus</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/setFreeMonitoring/"><span class="expand-icon"></span>setFreeMonitoring</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/nav-auditing/"><span class="expand-icon docs-expand-arrow"></span>System Events Auditing Commands</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/command/logApplicationMessage/"><span class="expand-icon"></span>logApplicationMessage</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/"><span class="expand-icon docs-expand-arrow"></span><code class="docutils literal"><span class="pre">mongo</span></code> Shell Methods</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/js-collection/"><span class="expand-icon docs-expand-arrow"></span>Collection Methods</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.aggregate/"><span class="expand-icon"></span>db.collection.aggregate()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.bulkWrite/"><span class="expand-icon"></span>db.collection.bulkWrite()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.copyTo/"><span class="expand-icon"></span>db.collection.copyTo()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.count/"><span class="expand-icon"></span>db.collection.count()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.countDocuments/"><span class="expand-icon"></span>db.collection.countDocuments()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.estimatedDocumentCount/"><span class="expand-icon"></span>db.collection.estimatedDocumentCount()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/"><span class="expand-icon"></span>db.collection.createIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.createIndexes/"><span class="expand-icon"></span>db.collection.createIndexes()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.dataSize/"><span class="expand-icon"></span>db.collection.dataSize()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.deleteOne/"><span class="expand-icon"></span>db.collection.deleteOne()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.deleteMany/"><span class="expand-icon"></span>db.collection.deleteMany()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.distinct/"><span class="expand-icon"></span>db.collection.distinct()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.drop/"><span class="expand-icon"></span>db.collection.drop()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.dropIndex/"><span class="expand-icon"></span>db.collection.dropIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.dropIndexes/"><span class="expand-icon"></span>db.collection.dropIndexes()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.ensureIndex/"><span class="expand-icon"></span>db.collection.ensureIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.explain/"><span class="expand-icon"></span>db.collection.explain()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.find/"><span class="expand-icon"></span>db.collection.find()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.findAndModify/"><span class="expand-icon"></span>db.collection.findAndModify()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.findOne/"><span class="expand-icon"></span>db.collection.findOne()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndDelete/"><span class="expand-icon"></span>db.collection.findOneAndDelete()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndReplace/"><span class="expand-icon"></span>db.collection.findOneAndReplace()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.findOneAndUpdate/"><span class="expand-icon"></span>db.collection.findOneAndUpdate()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.getIndexes/"><span class="expand-icon"></span>db.collection.getIndexes()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.getShardDistribution/"><span class="expand-icon"></span>db.collection.getShardDistribution()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.getShardVersion/"><span class="expand-icon"></span>db.collection.getShardVersion()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.group/"><span class="expand-icon"></span>db.collection.group()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.insert/"><span class="expand-icon"></span>db.collection.insert()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.insertOne/"><span class="expand-icon"></span>db.collection.insertOne()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.insertMany/"><span class="expand-icon"></span>db.collection.insertMany()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.isCapped/"><span class="expand-icon"></span>db.collection.isCapped()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.latencyStats/"><span class="expand-icon"></span>db.collection.latencyStats()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.mapReduce/"><span class="expand-icon"></span>db.collection.mapReduce()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.reIndex/"><span class="expand-icon"></span>db.collection.reIndex()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.remove/"><span class="expand-icon"></span>db.collection.remove()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.renameCollection/"><span class="expand-icon"></span>db.collection.renameCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.replaceOne/"><span class="expand-icon"></span>db.collection.replaceOne()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.save/"><span class="expand-icon"></span>db.collection.save()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.stats/"><span class="expand-icon"></span>db.collection.stats()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.storageSize/"><span class="expand-icon"></span>db.collection.storageSize()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.totalIndexSize/"><span class="expand-icon"></span>db.collection.totalIndexSize()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.totalSize/"><span class="expand-icon"></span>db.collection.totalSize()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.update/"><span class="expand-icon"></span>db.collection.update()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.updateOne/"><span class="expand-icon"></span>db.collection.updateOne()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.updateMany/"><span class="expand-icon"></span>db.collection.updateMany()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.watch/"><span class="expand-icon"></span>db.collection.watch()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.validate/"><span class="expand-icon"></span>db.collection.validate()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/js-cursor/"><span class="expand-icon docs-expand-arrow"></span>Cursor Methods</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.addOption/"><span class="expand-icon"></span>cursor.addOption()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.batchSize/"><span class="expand-icon"></span>cursor.batchSize()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.close/"><span class="expand-icon"></span>cursor.close()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.isClosed/"><span class="expand-icon"></span>cursor.isClosed()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.collation/"><span class="expand-icon"></span>cursor.collation()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.comment/"><span class="expand-icon"></span>cursor.comment()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.count/"><span class="expand-icon"></span>cursor.count()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.explain/"><span class="expand-icon"></span>cursor.explain()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.forEach/"><span class="expand-icon"></span>cursor.forEach()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.hasNext/"><span class="expand-icon"></span>cursor.hasNext()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.hint/"><span class="expand-icon"></span>cursor.hint()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.isExhausted/"><span class="expand-icon"></span>cursor.isExhausted()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.itcount/"><span class="expand-icon"></span>cursor.itcount()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.limit/"><span class="expand-icon"></span>cursor.limit()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.map/"><span class="expand-icon"></span>cursor.map()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.max/"><span class="expand-icon"></span>cursor.max()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.maxScan/"><span class="expand-icon"></span>cursor.maxScan()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.maxTimeMS/"><span class="expand-icon"></span>cursor.maxTimeMS()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.min/"><span class="expand-icon"></span>cursor.min()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.next/"><span class="expand-icon"></span>cursor.next()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.noCursorTimeout/"><span class="expand-icon"></span>cursor.noCursorTimeout()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.objsLeftInBatch/"><span class="expand-icon"></span>cursor.objsLeftInBatch()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.pretty/"><span class="expand-icon"></span>cursor.pretty()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.readConcern/"><span class="expand-icon"></span>cursor.readConcern()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.readPref/"><span class="expand-icon"></span>cursor.readPref()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.returnKey/"><span class="expand-icon"></span>cursor.returnKey()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.showRecordId/"><span class="expand-icon"></span>cursor.showRecordId()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.size/"><span class="expand-icon"></span>cursor.size()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.skip/"><span class="expand-icon"></span>cursor.skip()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.sort/"><span class="expand-icon"></span>cursor.sort()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.tailable/"><span class="expand-icon"></span>cursor.tailable()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cursor.toArray/"><span class="expand-icon"></span>cursor.toArray()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/js-database/"><span class="expand-icon docs-expand-arrow"></span>Database Methods</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.adminCommand/"><span class="expand-icon"></span>db.adminCommand()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.aggregate/"><span class="expand-icon"></span>db.aggregate()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.cloneCollection/"><span class="expand-icon"></span>db.cloneCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.cloneDatabase/"><span class="expand-icon"></span>db.cloneDatabase()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.commandHelp/"><span class="expand-icon"></span>db.commandHelp()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.copyDatabase/"><span class="expand-icon"></span>db.copyDatabase()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.createCollection/"><span class="expand-icon"></span>db.createCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.createView/"><span class="expand-icon"></span>db.createView()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.currentOp/"><span class="expand-icon"></span>db.currentOp()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.dropDatabase/"><span class="expand-icon"></span>db.dropDatabase()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.eval/"><span class="expand-icon"></span>db.eval()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.fsyncLock/"><span class="expand-icon"></span>db.fsyncLock()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.fsyncUnlock/"><span class="expand-icon"></span>db.fsyncUnlock()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getCollection/"><span class="expand-icon"></span>db.getCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getCollectionInfos/"><span class="expand-icon"></span>db.getCollectionInfos()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getCollectionNames/"><span class="expand-icon"></span>db.getCollectionNames()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getLastError/"><span class="expand-icon"></span>db.getLastError()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getLastErrorObj/"><span class="expand-icon"></span>db.getLastErrorObj()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getLogComponents/"><span class="expand-icon"></span>db.getLogComponents()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getMongo/"><span class="expand-icon"></span>db.getMongo()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getName/"><span class="expand-icon"></span>db.getName()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getPrevError/"><span class="expand-icon"></span>db.getPrevError()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getProfilingLevel/"><span class="expand-icon"></span>db.getProfilingLevel()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getProfilingStatus/"><span class="expand-icon"></span>db.getProfilingStatus()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getReplicationInfo/"><span class="expand-icon"></span>db.getReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getSiblingDB/"><span class="expand-icon"></span>db.getSiblingDB()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.help/"><span class="expand-icon"></span>db.help()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.hostInfo/"><span class="expand-icon"></span>db.hostInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.isMaster/"><span class="expand-icon"></span>db.isMaster()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.killOp/"><span class="expand-icon"></span>db.killOp()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.listCommands/"><span class="expand-icon"></span>db.listCommands()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.logout/"><span class="expand-icon"></span>db.logout()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.printCollectionStats/"><span class="expand-icon"></span>db.printCollectionStats()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.printReplicationInfo/"><span class="expand-icon"></span>db.printReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.printShardingStatus/"><span class="expand-icon"></span>db.printShardingStatus()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.printSlaveReplicationInfo/"><span class="expand-icon"></span>db.printSlaveReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.repairDatabase/"><span class="expand-icon"></span>db.repairDatabase()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.resetError/"><span class="expand-icon"></span>db.resetError()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.runCommand/"><span class="expand-icon"></span>db.runCommand()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.serverBuildInfo/"><span class="expand-icon"></span>db.serverBuildInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.serverCmdLineOpts/"><span class="expand-icon"></span>db.serverCmdLineOpts()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.serverStatus/"><span class="expand-icon"></span>db.serverStatus()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.setLogLevel/"><span class="expand-icon"></span>db.setLogLevel()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.setProfilingLevel/"><span class="expand-icon"></span>db.setProfilingLevel()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.shutdownServer/"><span class="expand-icon"></span>db.shutdownServer()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.stats/"><span class="expand-icon"></span>db.stats()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.version/"><span class="expand-icon"></span>db.version()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.watch/"><span class="expand-icon"></span>db.watch()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/js-plan-cache/"><span class="expand-icon docs-expand-arrow"></span>Query Plan Cache Methods</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.getPlanCache/"><span class="expand-icon"></span>db.collection.getPlanCache()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/PlanCache.clear/"><span class="expand-icon"></span>PlanCache.clear()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/PlanCache.clearPlansByQuery/"><span class="expand-icon"></span>PlanCache.clearPlansByQuery()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/PlanCache.getPlansByQuery/"><span class="expand-icon"></span>PlanCache.getPlansByQuery()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/PlanCache.help/"><span class="expand-icon"></span>PlanCache.help()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/PlanCache.listQueryShapes/"><span class="expand-icon"></span>PlanCache.listQueryShapes()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/js-bulk/"><span class="expand-icon docs-expand-arrow"></span>Bulk Operation Methods</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.initializeOrderedBulkOp/"><span class="expand-icon"></span>db.collection.initializeOrderedBulkOp()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.initializeUnorderedBulkOp/"><span class="expand-icon"></span>db.collection.initializeUnorderedBulkOp()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk/"><span class="expand-icon"></span>Bulk()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.execute/"><span class="expand-icon"></span>Bulk.execute()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.find/"><span class="expand-icon"></span>Bulk.find()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.find.arrayFilters/"><span class="expand-icon"></span>Bulk.find.arrayFilters()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.find.collation/"><span class="expand-icon"></span>Bulk.find.collation()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.find.remove/"><span class="expand-icon"></span>Bulk.find.remove()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.find.removeOne/"><span class="expand-icon"></span>Bulk.find.removeOne()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.find.replaceOne/"><span class="expand-icon"></span>Bulk.find.replaceOne()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.find.updateOne/"><span class="expand-icon"></span>Bulk.find.updateOne()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.find.update/"><span class="expand-icon"></span>Bulk.find.update()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.find.upsert/"><span class="expand-icon"></span>Bulk.find.upsert()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.getOperations/"><span class="expand-icon"></span>Bulk.getOperations()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.insert/"><span class="expand-icon"></span>Bulk.insert()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.tojson/"><span class="expand-icon"></span>Bulk.tojson()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Bulk.toString/"><span class="expand-icon"></span>Bulk.toString()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/js-user-management/"><span class="expand-icon docs-expand-arrow"></span>User Management Methods</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.auth/"><span class="expand-icon"></span>db.auth()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.changeUserPassword/"><span class="expand-icon"></span>db.changeUserPassword()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.createUser/"><span class="expand-icon"></span>db.createUser()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.dropUser/"><span class="expand-icon"></span>db.dropUser()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.dropAllUsers/"><span class="expand-icon"></span>db.dropAllUsers()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getUser/"><span class="expand-icon"></span>db.getUser()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getUsers/"><span class="expand-icon"></span>db.getUsers()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.grantRolesToUser/"><span class="expand-icon"></span>db.grantRolesToUser()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.removeUser/"><span class="expand-icon"></span>db.removeUser()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.revokeRolesFromUser/"><span class="expand-icon"></span>db.revokeRolesFromUser()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.updateUser/"><span class="expand-icon"></span>db.updateUser()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/js-role-management/"><span class="expand-icon docs-expand-arrow"></span>Role Management Methods</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.createRole/"><span class="expand-icon"></span>db.createRole()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.dropRole/"><span class="expand-icon"></span>db.dropRole()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.dropAllRoles/"><span class="expand-icon"></span>db.dropAllRoles()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getRole/"><span class="expand-icon"></span>db.getRole()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getRoles/"><span class="expand-icon"></span>db.getRoles()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.grantPrivilegesToRole/"><span class="expand-icon"></span>db.grantPrivilegesToRole()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.revokePrivilegesFromRole/"><span class="expand-icon"></span>db.revokePrivilegesFromRole()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.grantRolesToRole/"><span class="expand-icon"></span>db.grantRolesToRole()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.revokeRolesFromRole/"><span class="expand-icon"></span>db.revokeRolesFromRole()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.updateRole/"><span class="expand-icon"></span>db.updateRole()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/js-replication/"><span class="expand-icon docs-expand-arrow"></span>Replication Methods</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.add/"><span class="expand-icon"></span>rs.add()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.addArb/"><span class="expand-icon"></span>rs.addArb()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.conf/"><span class="expand-icon"></span>rs.conf()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.freeze/"><span class="expand-icon"></span>rs.freeze()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.help/"><span class="expand-icon"></span>rs.help()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.initiate/"><span class="expand-icon"></span>rs.initiate()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.printReplicationInfo/"><span class="expand-icon"></span>rs.printReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.printSlaveReplicationInfo/"><span class="expand-icon"></span>rs.printSlaveReplicationInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.reconfig/"><span class="expand-icon"></span>rs.reconfig()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.remove/"><span class="expand-icon"></span>rs.remove()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.slaveOk/"><span class="expand-icon"></span>rs.slaveOk()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.status/"><span class="expand-icon"></span>rs.status()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.stepDown/"><span class="expand-icon"></span>rs.stepDown()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rs.syncFrom/"><span class="expand-icon"></span>rs.syncFrom()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/js-sharding/"><span class="expand-icon docs-expand-arrow"></span>Sharding Methods</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.addShard/"><span class="expand-icon"></span>sh.addShard()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.addShardTag/"><span class="expand-icon"></span>sh.addShardTag()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.addShardToZone/"><span class="expand-icon"></span>sh.addShardToZone()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.addTagRange/"><span class="expand-icon"></span>sh.addTagRange()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.disableBalancing/"><span class="expand-icon"></span>sh.disableBalancing()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.enableBalancing/"><span class="expand-icon"></span>sh.enableBalancing()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.disableAutoSplit/"><span class="expand-icon"></span>sh.disableAutoSplit</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.enableAutoSplit/"><span class="expand-icon"></span>sh.enableAutoSplit</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.enableSharding/"><span class="expand-icon"></span>sh.enableSharding()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.getBalancerHost/"><span class="expand-icon"></span>sh.getBalancerHost()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.getBalancerState/"><span class="expand-icon"></span>sh.getBalancerState()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.removeTagRange/"><span class="expand-icon"></span>sh.removeTagRange()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.removeRangeFromZone/"><span class="expand-icon"></span>sh.removeRangeFromZone()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.help/"><span class="expand-icon"></span>sh.help()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.isBalancerRunning/"><span class="expand-icon"></span>sh.isBalancerRunning()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.moveChunk/"><span class="expand-icon"></span>sh.moveChunk()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.removeShardTag/"><span class="expand-icon"></span>sh.removeShardTag()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.removeShardFromZone/"><span class="expand-icon"></span>sh.removeShardFromZone()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.setBalancerState/"><span class="expand-icon"></span>sh.setBalancerState()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.shardCollection/"><span class="expand-icon"></span>sh.shardCollection()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.splitAt/"><span class="expand-icon"></span>sh.splitAt()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.splitFind/"><span class="expand-icon"></span>sh.splitFind()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.startBalancer/"><span class="expand-icon"></span>sh.startBalancer()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.status/"><span class="expand-icon"></span>sh.status()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.stopBalancer/"><span class="expand-icon"></span>sh.stopBalancer()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.waitForBalancer/"><span class="expand-icon"></span>sh.waitForBalancer()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.waitForBalancerOff/"><span class="expand-icon"></span>sh.waitForBalancerOff()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.waitForPingChange/"><span class="expand-icon"></span>sh.waitForPingChange()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sh.updateZoneKeyRange/"><span class="expand-icon"></span>sh.updateZoneKeyRange()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/convertShardKeyToHashed/"><span class="expand-icon"></span>convertShardKeyToHashed</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/js-free-monitoring/"><span class="expand-icon docs-expand-arrow"></span>Free Monitoring Methods</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.disableFreeMonitoring/"><span class="expand-icon"></span>db.disableFreeMonitoring()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.enableFreeMonitoring/"><span class="expand-icon"></span>db.enableFreeMonitoring()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.getFreeMonitoringStatus/"><span class="expand-icon"></span>db.getFreeMonitoringStatus</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/js-constructor/"><span class="expand-icon docs-expand-arrow"></span>Object Constructors and Methods</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/BulkWriteResult/"><span class="expand-icon"></span>BulkWriteResult()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Date/"><span class="expand-icon"></span>Date()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/ObjectId/"><span class="expand-icon"></span>ObjectId</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/ObjectId.getTimestamp/"><span class="expand-icon"></span>ObjectId.getTimestamp()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/ObjectId.toString/"><span class="expand-icon"></span>ObjectId.toString()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/ObjectId.valueOf/"><span class="expand-icon"></span>ObjectId.valueOf()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/UUID/"><span class="expand-icon"></span>UUID()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/WriteResult/"><span class="expand-icon"></span>WriteResult()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/WriteResult.hasWriteError/"><span class="expand-icon"></span>WriteResult.hasWriteError()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/WriteResult.hasWriteConcernError/"><span class="expand-icon"></span>WriteResult.hasWriteConcernError()</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/js-connection/"><span class="expand-icon docs-expand-arrow"></span>Connection Methods</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/connect/"><span class="expand-icon"></span>connect()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Mongo/"><span class="expand-icon"></span>Mongo()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Mongo.getDB/"><span class="expand-icon"></span>Mongo.getDB()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Mongo.getReadPrefMode/"><span class="expand-icon"></span>Mongo.getReadPrefMode()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Mongo.getReadPrefTagSet/"><span class="expand-icon"></span>Mongo.getReadPrefTagSet()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Mongo.isCausalConsistency/"><span class="expand-icon"></span>Mongo.isCausalConsistency()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Mongo.setCausalConsistency/"><span class="expand-icon"></span>Mongo.setCausalConsistency()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Mongo.setReadPref/"><span class="expand-icon"></span>Mongo.setReadPref()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Mongo.setSlaveOk/"><span class="expand-icon"></span>Mongo.setSlaveOk()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Mongo.startSession/"><span class="expand-icon"></span>Mongo.startSession()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Mongo.watch/"><span class="expand-icon"></span>Mongo.watch()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Session/"><span class="expand-icon docs-expand-arrow"></span>Session</a><ul style="display: none;"><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Session.abortTransaction/"><span class="expand-icon"></span>Session.abortTransaction()</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Session.commitTransaction/"><span class="expand-icon"></span>Session.commitTransaction()</a></li><li class="toctree-l5"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/Session.startTransaction/"><span class="expand-icon"></span>Session.startTransaction()</a></li></ul></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/SessionOptions/"><span class="expand-icon"></span>SessionOptions</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/js-native/"><span class="expand-icon docs-expand-arrow"></span>Native Methods</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cat/"><span class="expand-icon"></span>cat()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/cd/"><span class="expand-icon"></span>cd()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/copyDbpath/"><span class="expand-icon"></span>copyDbpath()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/fuzzFile/"><span class="expand-icon"></span>fuzzFile()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/getHostName/"><span class="expand-icon"></span>getHostName()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/getMemInfo/"><span class="expand-icon"></span>getMemInfo()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/hostname/"><span class="expand-icon"></span>hostname()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/listFiles/"><span class="expand-icon"></span>listFiles()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/load/"><span class="expand-icon"></span>load()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/ls/"><span class="expand-icon"></span>ls()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/md5sumFile/"><span class="expand-icon"></span>md5sumFile()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/mkdir/"><span class="expand-icon"></span>mkdir()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/pwd/"><span class="expand-icon"></span>pwd()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/quit/"><span class="expand-icon"></span>quit()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/removeFile/"><span class="expand-icon"></span>removeFile()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/resetDbpath/"><span class="expand-icon"></span>resetDbpath()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/sleep/"><span class="expand-icon"></span>sleep()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/setVerboseShell/"><span class="expand-icon"></span>setVerboseShell()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/version/"><span class="expand-icon"></span>version()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/isWindows/"><span class="expand-icon"></span>_isWindows()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/rand/"><span class="expand-icon"></span>_rand()</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/srand/"><span class="expand-icon"></span>_srand()</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/"><span class="expand-icon docs-expand-arrow"></span>MongoDB Package Components</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongod/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongod</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongos/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongos</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongo/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongo</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongod.exe/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongod.exe</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongos.exe/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongos.exe</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongodump/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongodump</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongorestore/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongorestore</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/bsondump/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">bsondump</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongoimport/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongoimport</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongoexport/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongoexport</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongostat/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongostat</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongotop/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongotop</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongoreplay/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongoreplay</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongoldap/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongoldap</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/mongofiles/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">mongofiles</span></code></a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/program/install_compass/"><span class="expand-icon"></span><code class="docutils literal"><span class="pre">install_compass</span></code></a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/configuration-options/"><span class="expand-icon docs-expand-arrow"></span>Configuration File Options</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/configuration-file-settings-command-line-options-mapping/"><span class="expand-icon"></span>Configuration File Settings and Command-Line Options Mapping</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/parameters/"><span class="expand-icon"></span>MongoDB Server Parameters</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/limits/"><span class="expand-icon"></span>MongoDB Limits and Thresholds</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/explain-results/"><span class="expand-icon"></span>Explain Results</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/system-collections/"><span class="expand-icon"></span>System Collections</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/connection-string/"><span class="expand-icon"></span>Connection String URI Format</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/collation/"><span class="expand-icon docs-expand-arrow"></span>Collation</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/collation-locales-defaults/"><span class="expand-icon"></span>Collation Locales and Default Parameters</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/mongodb-wire-protocol/"><span class="expand-icon"></span>MongoDB Wire Protocol</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/log-messages/"><span class="expand-icon"></span>Log Messages</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/exit-codes/"><span class="expand-icon"></span>Exit Codes and Statuses</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/glossary/"><span class="expand-icon"></span>Glossary</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/default-mongodb-port/"><span class="expand-icon"></span>Default MongoDB Port</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/reference/server-sessions/"><span class="expand-icon"></span>Server Sessions</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/">Release Notes</a><ul style="display: none;"><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/4.0/"><span class="expand-icon docs-expand-arrow"></span>Release Notes for MongoDB 4.0</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/4.0-compatibility/"><span class="expand-icon"></span>Compatibility Changes in MongoDB 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/4.0-upgrade-standalone/"><span class="expand-icon"></span>Upgrade a Standalone to 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/4.0-upgrade-replica-set/"><span class="expand-icon"></span>Upgrade a Replica Set to 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/4.0-upgrade-sharded-cluster/"><span class="expand-icon"></span>Upgrade a Sharded Cluster to 4.0</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/4.0-downgrade-standalone/"><span class="expand-icon"></span>Downgrade 4.0 Standalone to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/4.0-downgrade-replica-set/"><span class="expand-icon"></span>Downgrade 4.0 Replica Set to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/4.0-downgrade-sharded-cluster/"><span class="expand-icon"></span>Downgrade 4.0 Sharded Cluster to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/4.0-changelog/"><span class="expand-icon"></span>4.0 Changelog</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.6/"><span class="expand-icon docs-expand-arrow"></span>Release Notes for MongoDB 3.6</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.6-changelog/"><span class="expand-icon"></span>3.6 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.6-compatibility/"><span class="expand-icon"></span>Compatibility Changes in MongoDB 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.6-upgrade-standalone/"><span class="expand-icon"></span>Upgrade a Standalone to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.6-upgrade-replica-set/"><span class="expand-icon"></span>Upgrade a Replica Set to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.6-upgrade-sharded-cluster/"><span class="expand-icon"></span>Upgrade a Sharded Cluster to 3.6</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.6-downgrade-standalone/"><span class="expand-icon"></span>Downgrade 3.6 Standalone to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.6-downgrade-replica-set/"><span class="expand-icon"></span>Downgrade 3.6 Replica Set to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.6-downgrade-sharded-cluster/"><span class="expand-icon"></span>Downgrade 3.6 Sharded Cluster to 3.4</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.4/"><span class="expand-icon docs-expand-arrow"></span>Release Notes for MongoDB 3.4</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.4-changelog/"><span class="expand-icon"></span>3.4 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.4-compatibility/"><span class="expand-icon"></span>Compatibility Changes in MongoDB 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.4-upgrade-standalone/"><span class="expand-icon"></span>Upgrade a Standalone to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.4-upgrade-replica-set/"><span class="expand-icon"></span>Upgrade a Replica Set to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.4-upgrade-sharded-cluster/"><span class="expand-icon"></span>Upgrade a Sharded Cluster to 3.4</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.4-downgrade/"><span class="expand-icon docs-expand-arrow"></span>Downgrade MongoDB 3.4 to 3.2</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.4-downgrade-standalone/"><span class="expand-icon"></span>Downgrade 3.4 Standalone to 3.2</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.4-downgrade-replica-set/"><span class="expand-icon"></span>Downgrade 3.4 Replica Set to 3.2</a></li><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.4-downgrade-sharded-cluster/"><span class="expand-icon"></span>Downgrade 3.4 Sharded Cluster to 3.2</a></li></ul></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.2/"><span class="expand-icon docs-expand-arrow"></span>Release Notes for MongoDB 3.2</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.2-changelog/"><span class="expand-icon"></span>3.2 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.2-compatibility/"><span class="expand-icon docs-expand-arrow"></span>Compatibility Changes in MongoDB 3.2</a><ul style="display: none;"><li class="toctree-l4"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.2-javascript/"><span class="expand-icon"></span>JavaScript Changes in MongoDB 3.2</a></li></ul></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.2-upgrade/"><span class="expand-icon"></span>Upgrade MongoDB to 3.2</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.2-downgrade/"><span class="expand-icon"></span>Downgrade MongoDB from 3.2</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.0/"><span class="expand-icon docs-expand-arrow"></span>Release Notes for MongoDB 3.0</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.0-changelog/"><span class="expand-icon"></span>3.0 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.0-compatibility/"><span class="expand-icon"></span>Compatibility Changes in MongoDB 3.0</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.0-upgrade/"><span class="expand-icon"></span>Upgrade MongoDB to 3.0</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.0-scram/"><span class="expand-icon"></span>Upgrade to SCRAM</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/3.0-downgrade/"><span class="expand-icon"></span>Downgrade MongoDB from 3.0</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/2.6/"><span class="expand-icon docs-expand-arrow"></span>Release Notes for MongoDB 2.6</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/2.6-changelog/"><span class="expand-icon"></span>2.6 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/2.6-compatibility/"><span class="expand-icon"></span>Compatibility Changes in MongoDB 2.6</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/2.6-upgrade/"><span class="expand-icon"></span>Upgrade MongoDB to 2.6</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/2.6-upgrade-authorization/"><span class="expand-icon"></span>Upgrade User Authorization Data to 2.6 Format</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/2.6-downgrade/"><span class="expand-icon"></span>Downgrade MongoDB from 2.6</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/2.4/"><span class="expand-icon docs-expand-arrow"></span>Release Notes for MongoDB 2.4</a><ul style="display: none;"><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/2.4-changelog/"><span class="expand-icon"></span>2.4 Changelog</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/2.4-javascript/"><span class="expand-icon"></span>JavaScript Changes in MongoDB 2.4</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/2.4-upgrade/"><span class="expand-icon"></span>Upgrade MongoDB to 2.4</a></li><li class="toctree-l3"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/2.4-index-types/"><span class="expand-icon"></span>Compatibility and Index Type Changes in MongoDB 2.4</a></li></ul></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/2.2/"><span class="expand-icon"></span>Release Notes for MongoDB 2.2</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/2.0/"><span class="expand-icon"></span>Release Notes for MongoDB 2.0</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/1.8/"><span class="expand-icon"></span>Release Notes for MongoDB 1.8</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/1.6/"><span class="expand-icon"></span>Release Notes for MongoDB 1.6</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/1.4/"><span class="expand-icon"></span>Release Notes for MongoDB 1.4</a></li><li class="toctree-l2"><a class="reference internal" href="https://docs.mongodb.com/manual/release-notes/1.2/"><span class="expand-icon"></span>Release Notes for MongoDB 1.2.x</a></li></ul></li><li class="toctree-l1"><a class="reference internal" href="https://docs.mongodb.com/manual/support/">Technical Support</a></li></ul>


    </div>
  </div>
           
         </aside>

   </div>

    <div id="main-column" class="main-column">

    <span id="showNav" class="showNav">Navigation</span>

      
        <div class="document">
            <div class="documentwrapper"><div class="bodywrapper">
              <div class="body" data-pagename="reference/operator/update">
                   <a class="edit-link" href="https://github.com/mongodb/docs/blob/v4.0/source/reference/operator/update.txt" target="_blank" title="Edit reference/operator/update.txt on GitHub">
    
      <span class="icon-edit"></span>
    
  </a>
                

                
  <div class="bc">
    
      <ul>
          <li><a href="https://docs.mongodb.com/manual/reference/">Reference</a><span class="bcpoint"> &gt; </span></li>
            
          <li><a href="https://docs.mongodb.com/manual/reference/operator/">Operators</a><span class="bcpoint"> &gt; </span></li>
            <li>Update Operators</li> 
      </ul>
    
    
  </div>
                
                  <div class="section" id="update-operators">
<h1>Update Operators<a class="headerlink" href="#update-operators" title="Permalink to this headline">¶</a></h1>
<div class="contents singlecol local topic" id="on-this-page">
<p class="topic-title first">On this page</p>
<ul class="simple">
<li><a class="reference internal" href="#id1" id="id3">Update Operators</a></li>
</ul>
</div>
<p>The following modifiers are available for use in update operations;
e.g. in <a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.update/#db.collection.update" title="db.collection.update()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.collection.update()</span></code></a> and
<a class="reference internal" href="https://docs.mongodb.com/manual/reference/method/db.collection.findAndModify/#db.collection.findAndModify" title="db.collection.findAndModify()"><code class="xref mongodb mongodb-method docutils literal"><span class="pre">db.collection.findAndModify()</span></code></a>.</p>
<p>Specify the operator expression in a document of the form:</p>
<div class="button-code-block">
<div class="button-row">
<a class="code-button--copy code-button" role="button">
copy<div class="code-button__tooltip code-button__tooltip--inactive">copied</div></a>
</div>
<div class="copyable-code-block highlight-javascript"><div class="highlight"><pre><span></span><span class="p">{</span>
   <span class="o">&lt;</span><span class="nx">operator1</span><span class="o">&gt;:</span> <span class="p">{</span> <span class="o">&lt;</span><span class="nx">field1</span><span class="o">&gt;:</span> <span class="o">&lt;</span><span class="nx">value1</span><span class="o">&gt;</span><span class="p">,</span> <span class="p">...</span> <span class="p">},</span>
   <span class="o">&lt;</span><span class="nx">operator2</span><span class="o">&gt;:</span> <span class="p">{</span> <span class="o">&lt;</span><span class="nx">field2</span><span class="o">&gt;:</span> <span class="o">&lt;</span><span class="nx">value2</span><span class="o">&gt;</span><span class="p">,</span> <span class="p">...</span> <span class="p">},</span>
   <span class="p">...</span>
<span class="p">}</span>
</pre></div>
</div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">For details on specific operator, including syntax and examples,
click on the specific operator to go to its reference page.</p>
</div>
<div class="section" id="id1">
<span id="id2"></span><h2>Update Operators<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<div class="section" id="fields">
<h3>Fields<a class="headerlink" href="#fields" title="Permalink to this headline">¶</a></h3>
<table border="1" class="docutils">
<colgroup>
<col width="14%">
<col width="86%">
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/currentDate/#up._S_currentDate" title="$currentDate"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$currentDate</span></code></a></td>
<td>Sets the value of a field to current date, either as a Date or a Timestamp.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/inc/#up._S_inc" title="$inc"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$inc</span></code></a></td>
<td>Increments the value of the field by the specified amount.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/min/#up._S_min" title="$min"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$min</span></code></a></td>
<td>Only updates the field if the specified value is less than the existing field value.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/max/#up._S_max" title="$max"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$max</span></code></a></td>
<td>Only updates the field if the specified value is greater than the existing field value.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/mul/#up._S_mul" title="$mul"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$mul</span></code></a></td>
<td>Multiplies the value of the field by the specified amount.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/rename/#up._S_rename" title="$rename"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$rename</span></code></a></td>
<td>Renames a field.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/set/#up._S_set" title="$set"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$set</span></code></a></td>
<td>Sets the value of a field in a document.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/setOnInsert/#up._S_setOnInsert" title="$setOnInsert"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$setOnInsert</span></code></a></td>
<td>Sets the value of a field if an update results in an insert of a document. Has no effect on update operations that modify existing documents.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/unset/#up._S_unset" title="$unset"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$unset</span></code></a></td>
<td>Removes the specified field from a document.</td>
</tr>
</tbody>
</table>
<div class="toctree-wrapper compound">
</div>
</div>
<div class="section" id="array">
<h3>Array<a class="headerlink" href="#array" title="Permalink to this headline">¶</a></h3>
<div class="section" id="operators">
<h4>Operators<a class="headerlink" href="#operators" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="17%">
<col width="83%">
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/positional/#up._S_" title="$"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$</span></code></a></td>
<td>Acts as a placeholder to update the first element that matches the query condition.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/positional-all/#up._S_[]" title="$[]"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$[]</span></code></a></td>
<td>Acts as a placeholder to update all elements in an array for the documents that match the query condition.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/positional-filtered/#up._S_[%3Cidentifier%3E]" title="$[&lt;identifier&gt;]"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$[&lt;identifier&gt;]</span></code></a></td>
<td>Acts as a placeholder to update all elements that match the <code class="docutils literal"><span class="pre">arrayFilters</span></code> condition for the documents that match the query condition.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/addToSet/#up._S_addToSet" title="$addToSet"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$addToSet</span></code></a></td>
<td>Adds elements to an array only if they do not already exist in the set.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/pop/#up._S_pop" title="$pop"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$pop</span></code></a></td>
<td>Removes the first or last item of an array.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/pull/#up._S_pull" title="$pull"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$pull</span></code></a></td>
<td>Removes all array elements that match a specified query.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/push/#up._S_push" title="$push"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$push</span></code></a></td>
<td>Adds an item to an array.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/pullAll/#up._S_pullAll" title="$pullAll"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$pullAll</span></code></a></td>
<td>Removes all matching values from an array.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="modifiers">
<h4>Modifiers<a class="headerlink" href="#modifiers" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="16%">
<col width="84%">
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/each/#up._S_each" title="$each"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$each</span></code></a></td>
<td>Modifies the <a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/push/#up._S_push" title="$push"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$push</span></code></a> and <a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/addToSet/#up._S_addToSet" title="$addToSet"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$addToSet</span></code></a> operators to append multiple items for array updates.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/position/#up._S_position" title="$position"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$position</span></code></a></td>
<td>Modifies the <a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/push/#up._S_push" title="$push"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$push</span></code></a> operator to specify the position in the array to add elements.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/slice/#up._S_slice" title="$slice"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$slice</span></code></a></td>
<td>Modifies the <a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/push/#up._S_push" title="$push"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$push</span></code></a> operator to limit the size of updated arrays.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/sort/#up._S_sort" title="$sort"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$sort</span></code></a></td>
<td>Modifies the <a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/push/#up._S_push" title="$push"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$push</span></code></a> operator to reorder documents stored in an array.</td>
</tr>
</tbody>
</table>
</div>
<div class="toctree-wrapper compound">
</div>
</div>
<div class="section" id="bitwise">
<h3>Bitwise<a class="headerlink" href="#bitwise" title="Permalink to this headline">¶</a></h3>
<table border="1" class="docutils">
<colgroup>
<col width="18%">
<col width="82%">
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="https://docs.mongodb.com/manual/reference/operator/update/bit/#up._S_bit" title="$bit"><code class="xref mongodb mongodb-update docutils literal"><span class="pre">$bit</span></code></a></td>
<td>Performs bitwise <code class="docutils literal"><span class="pre">AND</span></code>, <code class="docutils literal"><span class="pre">OR</span></code>, and <code class="docutils literal"><span class="pre">XOR</span></code> updates of integer values.</td>
</tr>
</tbody>
</table>
<div class="toctree-wrapper compound">
</div>
</div>
</div>
</div>

                
    <div id="btnv">
      <span class="btn-arrow-left">← &nbsp;</span>
      <a class="btn-prev-text" href="https://docs.mongodb.com/manual/reference/operator/projection/slice/" title="Previous Section: $slice (projection)"><span>$slice (projection)</span></a>
      <a class="btn-next-text" href="https://docs.mongodb.com/manual/reference/operator/update-field/" title="Next Section: Field Update Operators"><span>Field Update Operators</span></a>
      <span class="btn-arrow-right">&nbsp;→</span>
    </div>
                  <div class="footer">
                    <div class="copyright">
                      <p>© MongoDB, Inc 2008-present. MongoDB, Mongo, and the leaf logo are registered trademarks of MongoDB, Inc.</p>
                    </div>
                  </div>
              </div></div>
            </div>
        </div>
    <div class="marian"><div class="marian__heading">Search Results</div><ul class="tab-strip"><li class="tab-strip__element" aria-selected="true">MongoDB Manual v4.0</li><li class="tab-strip__element" aria-selected="false">All Results</li></ul><div class="spinner"></div><ul class="marian-results"></ul></div></div>
    <div class="right-column">
      <div class="wrapper"> <div id="mongodb-docs-1"></div>
            <div class="social">
               <a class="slack-icon" href="https://slackpass.io/mongo-db?jmp=docs" title="https://slackpass.io/mongo-db?jmp=docs"><i class="fab fa-slack" aria-hidden="true"></i></a>
               <a class="twitter-icon" href="https://twitter.com/MongoDB" title="https://twitter.com/MongoDB"><i class="fab fa-twitter-square"></i></a>
               <a class="youtube-icon" href="https://www.youtube.com/user/MongoDB" title="https://www.youtube.com/user/MongoDB"><i class="fab fa-youtube-square"></i></a>
               <a class="facebook-icon" href="https://www.facebook.com/mongodb" title="https://www.facebook.com/mongodb"><i class="fab fa-facebook-square"></i></a>
               <a class="stack-overflow-icon" href="https://stackoverflow.com/tags/mongodb/info" title="https://stackoverflow.com/tags/mongodb/info"><i class="fab fa-stack-overflow" aria-hidden="true"></i></a>
            </div>
        

      </div>
    </div>
    
      <div id="rating-panel"><div><div class="deluge"><div class="deluge-header"><span class="fa fa-comments deluge-comment-icon"></span><span class="deluge-helpful">Was this page helpful?</span></div><div class="deluge-vote"><a id="rate-up">Yes</a><a id="rate-down">No</a></div><div class="deluge-body"></div></div></div></div>
    
    <div class="clearfix"></div>
  </div>
  

  <script type="text/javascript">
  // Bootstrap array of links that should trigger a full page reload
  window.docsExcludedNav = ['/administration', '/administration/production-checklist', '/administration/indexes-management', '/aggregation', '/applications/geospatial-indexes', '/applications/indexes', '/contributors/getting-started', '/core/2d', '/core/2dsphere', '/core/auditing', '/core/authentication', '/core/authorization', '/core/backups', '/core/read-isolation-consistency-recency', '/core/databases-and-collections', '/core/geohaystack', '/core/index-single', '/core/index-compound', '/core/index-creation', '/core/index-hashed', '/core/index-multikey', '/core/index-partial', '/core/index-sparse', '/core/index-text', '/core/index-ttl', '/core/index-unique', '/core/journaling', '/core/kerberos', '/core/map-reduce', '/core/operational-segregation', '/core/query-optimization', '/core/replica-set-architectures', '/core/replica-set-high-availability', '/core/replica-set-members', '/core/replica-set-secondary', '/core/transactions', '/geospatial-queries', '/replication', '/core/sharded-cluster-components', '/core/wiredtiger', '/core/write-operations-atomicity', '/crud', '/indexes', '/installation', '/introduction', '/mongo', '/products/bi-connector', '/reference/command', '/reference/collation', '/text-search', '/tutorial/manage-the-database-profiler', '/core/index-text', '/reference/configuration-options', '/reference/indexes', '/reference/method', '/reference/operator/aggregation', '/reference/operator/query', '/reference/operator/query-modifier', '/reference/operator/update', '/reference/replication', '/reference/read-concern', '/reference/security', '/reference/sharding', '/reference/write-concern', '/release-notes/2.4', '/release-notes/2.6', '/release-notes/2.8', '/release-notes/3.0', '/release-notes/3.2', '/release-notes/3.4', '/release-notes/3.6', '/release-notes/4.0', '/security', '/sharding', '/changeStreams', '/core/zone-sharding', '/core/hashed-sharding', '/core/ranged-sharding', '/storage', '/tutorial/change-sharded-cluster-wiredtiger', '/tutorial/insert-documents', '/tutorial/query-documents', '/tutorial/remove-documents', '/tutorial/update-documents', '/tutorial/enable-authentication', '/tutorial/install-mongodb-on-ubuntu', '/tutorial/install-mongodb-on-windows', '/tutorial/install-mongodb-on-red-hat', '/tutorial/install-mongodb-on-debian', '/tutorial/install-mongodb-on-suse', '/tutorial/install-mongodb-on-amazon', '/tutorial/install-mongodb-enterprise-on-windows', '/tutorial/install-mongodb-on-os-x'];
  </script>
<script type="text/javascript" id="">adroll_adv_id="VC7KN272KJFYNCZSKCA7GR";adroll_pix_id="3L5E5MU7GBC3NMYB75WIRR";(function(a,e,c,d,b){a.__adroll_loaded=!0;a.adroll=a.adroll||[];a.adroll.f=["identify","track"];for(b=0;b<a.adroll.f.length;b++)a.adroll[a.adroll.f[b]]=a.adroll[a.adroll.f[b]]||function(b){return function(){a.adroll.push([b,arguments])}}(a.adroll.f[b]);c=e.createElement("script");d=e.getElementsByTagName("script")[0];c.async=1;c.src="https://s.adroll.com/j/roundtrip.js";d.parentNode.insertBefore(c,d)})(window,document);</script><script type="text/javascript" id="">var _elqQ=_elqQ||[];_elqQ.push(["elqSetSiteId","413370795"]);_elqQ.push(["elqTrackPageView"]);(function(){var a=document.createElement("script");a.type="text/javascript";a.async=!0;a.src="//img03.en25.com/i/elqCfg.min.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b)})();</script><script type="text/javascript" id="">_bizo_data_partner_id="6855";</script>
<script type="text/javascript" id="">(function(){var b=document.getElementsByTagName("script")[0],a=document.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"===window.location.protocol?"https://sjs":"http://js")+".bizographics.com/insight.min.js";b.parentNode.insertBefore(a,b)})();</script>
<noscript>
  <img height="1" width="1" alt="" style="display:none;" src="//www.bizographics.com/collect/?pid=6855&amp;fmt=gif">
</noscript><script type="text/javascript" id="">setTimeout(function(){var a=document.createElement("script"),b=document.getElementsByTagName("script")[0];a.src=document.location.protocol+"//script.crazyegg.com/pages/scripts/0043/5640.js?"+Math.floor((new Date).getTime()/36E5);a.async=!0;a.type="text/javascript";b.parentNode.insertBefore(a,b)},1);</script><script type="text/javascript" id="" src="./Update Operators_files/bizible.js"></script>
<script type="text/javascript" id="">!function(b,e,f,g,a,c,d){b.fbq||(a=b.fbq=function(){a.callMethod?a.callMethod.apply(a,arguments):a.queue.push(arguments)},b._fbq||(b._fbq=a),a.push=a,a.loaded=!0,a.version="2.0",a.queue=[],c=e.createElement(f),c.async=!0,c.src=g,d=e.getElementsByTagName(f)[0],d.parentNode.insertBefore(c,d))}(window,document,"script","https://connect.facebook.net/en_US/fbevents.js");fbq("init","1704057423217375");fbq("track","PageView");</script>
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1704057423217375&amp;ev=PageView&amp;noscript=1"></noscript>

<img src="./Update Operators_files/ipv" style="display: none;"></body></html>